Posts

android - How can I change Application name, project name, package name, and its icon? -

i have existing project. want change application name project name package name icon is possible set them again? use eclipse ide. for changing: app name: go res->values->string.xml -> change appname app icon: go android manifest -> android:icon = "@drawble/youricon" package name: in eclipse, right click on project android tools->rename application packege . detail follow link project name: select project, go file menu -> rename or press f2 .

Joining Summed data that has nulls - SQL Server -

how retain acct_name field appropriate when summing data below amount column , grouping line_num field? "null" values in line_num column cause problem in grouping terms when account name added. accounts c , d both have null values in line_num . if add acct_name group by clause, lose ability sum values line_num field. i attempting sum lines of accounting , group based on line number. null data isn't doing, unfortunately it's data set handed. original data: acct_name id line_num amount acct 1 1_01 100.0000 acct 1 1_01 -50.0000 acct 1 1_02 75.0000 acct 1 _02 125.0000 acct b 2 2_01 200.0000 acct b 2 2_01 50.0000 acct b 2 2_02 25.0000 acct c 3 3_01 75.0000 acct c 3 3_02 50.0000 acct c 3 3_03 -25.0000 acct c 3 null 65.0000 acct d 4 null 300.0000 a...

javascript - Local script/css vs. CDN on mobile PhoneGap app -

i understand benefits of including scripts and/or css through cdn on standard web page. however, seems in case of phonegap app in javascripts , css can downloaded app, cdn decrease performance. so question is: there benefits using cdn mobile phonegap app? you right. common mistake new phonegap result in slow application start-up. depend on scenario, may disbenefit use cdn mobile phonegap app. due webview/browser behavior, phonegap picky on having it's resources locally. if want application load fast, initial resources should local. if web developer, you've come across suggestion of loading js file @ end of body tag rather in head tag. webview/browser thread availability same reason why it's better have file local in phonegap. remember have wait body onload before phonegap deviceready event. now, on other hand, if load blogs/articles on subsequent single page application view ajax, benefit cdn hosting of blog/article static contents.

ruby on rails - Image attribute not saving in test with FactoryGirl -

app i have column bg_image in table user uses carrierwave uploader mount_uploader :bg_image, userlogouploader it gets set in activeadmin/formtastic form below: f.input :bg_image, :label => "background image", :as => :file tests (where problem is) i have factory user make basic version required fields (which works in other tests), when try add bg_image doesn't saved. factory: factorygirl.define factory :user stuff "set in factory" end end test file: let!(:user) { create(:user, :something => "that works", :bg_image => "doesntwork.png") } "inspects element" puts user.inspect end prints out #<user id: 1, stuff: "set in factory", something: "that works", bg_image: nil> i can't seem figure out why doesn't save! i tried few things setting file object won't work because needs string im pretty sure not working because in tests using bg_...

editor - insert numerical sequence in large text file -

i need create file in format : item0000001 item0000002 item0000003 item0000004 item0000005 i doing ultraedit has column mode including insert number ( start + increment including leading zeros ). unfortunately, ultraedit bombs out above 1 million rows. does know of text editor large file capacity has similar operation? baltostar has not written version of ultraedit used , how has tried create file. however, here ultraedit script can used create file lines containing incrementing number leading zeros according last number. to use script ultraedit v14.20 or uestudio v9.00 or later version, copy code block of script , paste new ascii file dos line terminations in ultraedit/uestudio. save file example createlineswithincrementingnumber.js preferred directory of ue/ues scripts. now run script clicking on menu item run active script in menu scripting . the script prompts user first , last value of incrementing number, , strings left , right of incrementing numbe...

windows - How do I draw lines inside a Visual C++ PictureBox -

i want draw black lines inside visual c++ forms picturebox plot information. can how should go doing this? can picturebox used or should use else instead? to draw on winforms control, handle paint event, graphics object, , call drawline or other methods heart's content. there's example of on msdn .

Writing a JSON (or TXT) file in WPF C# -

i have been trying make sense of http://msdn.microsoft.com/en-us/library/sfezx97z.aspx uses savefiledialog, hard me understand. have following code: fileinfo existingfile = new fileinfo("c:\\users\\cle1394\\desktop\\apple foreign tax payment sample layout proposed - sample data.xlsx"); consoleapplication2.program.exceldata data = consoleapplication2.program.getexceldata(existingfile); var json = new javascriptserializer().serialize(data); how can output contents of json .json or .txt file? i let user either see link/ button click download/ save file location on computer, or, display save file dialog box can save file location on computer. edit (to let op comment on parts not clear): savefiledialog savefiledialog1 = new savefiledialog(); savefiledialog1.showdialog(); if(savefiledialog1.filename != "") { file.writealltext(savefiledialog1.filename,json); } you looking this, then: file.writealltext(@"c:\some\path\json.txt"...