PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
7,470,262
09/19/2011 11:32:51
730,600
04/29/2011 06:54:56
40
4
how to create a webservice to upload a files on server in php
I have to create a web service in php which will upload audio and image files to server. basically i want this web service to work for ios. Now i have no idea where to start. and in what manner that web service will be consumed by ios. can anybody help me. Thanks in advance.
php
web-services
null
null
null
09/19/2011 20:15:07
not a real question
how to create a webservice to upload a files on server in php === I have to create a web service in php which will upload audio and image files to server. basically i want this web service to work for ios. Now i have no idea where to start. and in what manner that web service will be consumed by ios. can anybody help me. Thanks in advance.
1
3,787,821
09/24/2010 14:01:42
72,995
03/02/2009 22:39:25
1,805
74
What components make VIM a good (great) ruby editor?
I'm learning **ruby on rails** on a **linux** box and dusting off my **VIM** skills (skillz?). ![alt text][1] When I got started on VIM way back in my c++ days, I had a friend with a great vimfiles folder that had tons of stuff to get started. Starting from scratch, vim is great, but it feels like it could be a lot better. I currently have: * [vim-ruby][2] * [buffer explorer][3] * [xml-edit][4] (though I don't have it currently working with erb files) I know that barely scratches the surface of what some more experienced vim/ruby devs have (including the one offs in the vim.rc file). Is there a list somewhere (or could we create one) of a bunch of the standard vim configurations needed to make programming ruby (and rails) more fun? Is there a zip/tarball somewhere with a good base setup? [1]: http://i.stack.imgur.com/NrUO5.png [2]: http://github.com/vim-ruby/vim-ruby [3]: http://vim.sourceforge.net/scripts/script.php?script_id=42 [4]: http://vim.sourceforge.net/scripts/script.php?script_id=301
ruby-on-rails
ruby
vim
vimrc
null
null
open
What components make VIM a good (great) ruby editor? === I'm learning **ruby on rails** on a **linux** box and dusting off my **VIM** skills (skillz?). ![alt text][1] When I got started on VIM way back in my c++ days, I had a friend with a great vimfiles folder that had tons of stuff to get started. Starting from scratch, vim is great, but it feels like it could be a lot better. I currently have: * [vim-ruby][2] * [buffer explorer][3] * [xml-edit][4] (though I don't have it currently working with erb files) I know that barely scratches the surface of what some more experienced vim/ruby devs have (including the one offs in the vim.rc file). Is there a list somewhere (or could we create one) of a bunch of the standard vim configurations needed to make programming ruby (and rails) more fun? Is there a zip/tarball somewhere with a good base setup? [1]: http://i.stack.imgur.com/NrUO5.png [2]: http://github.com/vim-ruby/vim-ruby [3]: http://vim.sourceforge.net/scripts/script.php?script_id=42 [4]: http://vim.sourceforge.net/scripts/script.php?script_id=301
0
11,579,616
07/20/2012 12:42:14
752,288
05/13/2011 11:41:29
860
41
In jquery parent of same sibling when compared returning false
I am having a tree of ul li. I have either a checkbox or a radio control for each set of child nodes. What I am doing is when I check any checkbox or radio I want all the nodes to be unchecked except for the sibling (in case of checkbox). So I have written my jquery here. My jquery is working expect for one problem which I need help. It is below: if($(this).parent().parent().parent() != $(elem).parent().parent().parent()) The whole fiddle is [here](http://jsfiddle.net/ashwyn/LSw4d/3/) In the above condition when I compare the same parents I should get `false` sometimes. Please look into the code and help to understand why they are always returning true.
javascript
jquery
object
tree
null
null
open
In jquery parent of same sibling when compared returning false === I am having a tree of ul li. I have either a checkbox or a radio control for each set of child nodes. What I am doing is when I check any checkbox or radio I want all the nodes to be unchecked except for the sibling (in case of checkbox). So I have written my jquery here. My jquery is working expect for one problem which I need help. It is below: if($(this).parent().parent().parent() != $(elem).parent().parent().parent()) The whole fiddle is [here](http://jsfiddle.net/ashwyn/LSw4d/3/) In the above condition when I compare the same parents I should get `false` sometimes. Please look into the code and help to understand why they are always returning true.
0
4,004,522
10/23/2010 14:42:33
471,961
10/11/2010 05:26:29
21
0
What is this java code?
Please teach me what this code do as I not good in Java. Interface and abstract in MIDIPlayerListener.java public interface MIDIPlayerListener { public abstract void songChanged(MIDIPlayer p); } TempoSlider.java import java.awt.*; import javax.sound.midi.Sequencer; import javax.swing.*; import javax.swing.event.*; public class TempoSlider extends JSlider implements ChangeListener, MIDIPlayerListener { MIDIPlayer p; Sequencer seq; PositSlider slid; JLabel tempoLabel; int curTempo = 120; public TempoSlider(MIDIPlayer p, JLabel tempoLabel) { super(10, 240, 120); this.p = p; this.seq = p.p.getSequencer(); this.slid = p.slid; this.tempoLabel = tempoLabel; addChangeListener(this); p.addPlayerListener(this); setPreferredSize(new Dimension(400, 20)); } public void stateChanged(ChangeEvent arg0) { //seq.setTempoInBPM(getValue()); seq.setTempoFactor((float)getValue()/curTempo); tempoLabel.setText("Tempo: "+getValue()); slid.setTempoFactor(getValue()/curTempo); } public void songChanged(MIDIPlayer p) { seq.setTempoFactor(1); curTempo = (int)seq.getTempoInBPM(); setValue(curTempo); } }
java
null
null
null
null
10/23/2010 14:57:49
not a real question
What is this java code? === Please teach me what this code do as I not good in Java. Interface and abstract in MIDIPlayerListener.java public interface MIDIPlayerListener { public abstract void songChanged(MIDIPlayer p); } TempoSlider.java import java.awt.*; import javax.sound.midi.Sequencer; import javax.swing.*; import javax.swing.event.*; public class TempoSlider extends JSlider implements ChangeListener, MIDIPlayerListener { MIDIPlayer p; Sequencer seq; PositSlider slid; JLabel tempoLabel; int curTempo = 120; public TempoSlider(MIDIPlayer p, JLabel tempoLabel) { super(10, 240, 120); this.p = p; this.seq = p.p.getSequencer(); this.slid = p.slid; this.tempoLabel = tempoLabel; addChangeListener(this); p.addPlayerListener(this); setPreferredSize(new Dimension(400, 20)); } public void stateChanged(ChangeEvent arg0) { //seq.setTempoInBPM(getValue()); seq.setTempoFactor((float)getValue()/curTempo); tempoLabel.setText("Tempo: "+getValue()); slid.setTempoFactor(getValue()/curTempo); } public void songChanged(MIDIPlayer p) { seq.setTempoFactor(1); curTempo = (int)seq.getTempoInBPM(); setValue(curTempo); } }
1
10,354,781
04/27/2012 16:54:22
1,123,626
12/30/2011 22:21:05
32
0
Spring 3 internet domain specific controller
I'm trying to build an application that will serve multiple internet sites. Each site would have its own controller. This is the starting point. This part works. @Controller @RequestMapping(value="/") public class HockeyPlController extends BaseController { @RequestMapping(method=RequestMethod.GET) public ModelAndView load(Model model, Locale locale) { ModelAndView modelAndView=new ModelAndView(); modelAndView.setViewName(WebView.HOCKEY_PL_INDEX.getViewName()); return modelAndView; } Now, the challenge is to make this controller respond to a particular domain url. Bozho had some sample code for this in another post. I'm trying to follow his example by annotating the controller this way: @RequestMapping(value="/", headers="Host=www.hockey.pl") This does not work, unfortunately. It's getting to Spring but it dies there. In case it matters, I defined the domain url in Windows host file just like localhost, and use the following to test: `http://www.hockey.pl:8080/SiteAdmin/` . SiteAdmin is the context root. Here's some info from my console: DispatcherServlet with name 'spring' processing GET request for [/SiteAdmin/] Looking up handler method for path / Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported Null ModelAndView returned to DispatcherServlet with name 'spring': assuming HandlerAdapter completed request handling
spring
controller
null
null
null
null
open
Spring 3 internet domain specific controller === I'm trying to build an application that will serve multiple internet sites. Each site would have its own controller. This is the starting point. This part works. @Controller @RequestMapping(value="/") public class HockeyPlController extends BaseController { @RequestMapping(method=RequestMethod.GET) public ModelAndView load(Model model, Locale locale) { ModelAndView modelAndView=new ModelAndView(); modelAndView.setViewName(WebView.HOCKEY_PL_INDEX.getViewName()); return modelAndView; } Now, the challenge is to make this controller respond to a particular domain url. Bozho had some sample code for this in another post. I'm trying to follow his example by annotating the controller this way: @RequestMapping(value="/", headers="Host=www.hockey.pl") This does not work, unfortunately. It's getting to Spring but it dies there. In case it matters, I defined the domain url in Windows host file just like localhost, and use the following to test: `http://www.hockey.pl:8080/SiteAdmin/` . SiteAdmin is the context root. Here's some info from my console: DispatcherServlet with name 'spring' processing GET request for [/SiteAdmin/] Looking up handler method for path / Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported Null ModelAndView returned to DispatcherServlet with name 'spring': assuming HandlerAdapter completed request handling
0
8,775,193
01/08/2012 03:36:30
1,136,671
01/08/2012 03:23:18
1
0
Cooding BigInt Division
Been trying to code BigInt division for a while. My latest algorithm uses binary division, but somehow I don't think that this is very good. Just looking for some ideas as to what algorithms may be out there ; ). The language I'm working in doesn't support passing things like arrays around or various data types. I'm pretty much stuck with integers and booleans and global arrays as well as local arrays declared at the top of the function. I'm working with a word size of 32768 for increased speed, which happens to be 2^15. Because of this, I can quickly and efficiently convert to base 2 and back, which is why I decided to try a binary division algorithm approach. My first approach caused the remainder to overflow in some situations, but it was extremely fast. My next approach was an idea of polynomial long division. I also tried the quotient idea, although it would fail on extremely big numbers as there would be way too many subtractions involved. Overall, I think that the crappy binary division algorithm may be the best bet ; |. I know that the variable names are ugly, but that is because the lookups get slower with longer variable names, which is just ridiculous >.<. Numbers get smaller towards the end of the divisor and remainder arrays. They are smaller towards the beginning of the dividend array. The final answer is stored in divb with size divc (quotient) and m with size mc (remainder). This thing works with 0 bugs, but I have a feeling that it is just really bad :o. globals private static integer array divb //division binary buffer #1 (to be divided) private static integer divc //division binary count #1 private static integer array divb2 //division binary buffer #2 (to divide) private static integer divc2 //division binary count #2 private static integer dmod //division remainder endglobals Code: local integer d = divc //to be divided int digit count local integer d2 //temp digit 2 local integer d3 //temp digit 3 local integer array m //remainder local integer mc = 0 //remainder count local boolean less //is the remainder < divisor? local integer sub //subtract -1 or 0 (shift the divisor by 1 bit for extra digit) local boolean gathered //were bits gathered? loop //gather bits equal to the length of the divisor only if the current remainder isn't equal to length of divisor and there are bits remaining set gathered = false set gathered = mc != divc2 and 0 != d if (gathered) then loop exitwhen mc == divc2 or 0 == d set d = d - 1 set m[mc] = divb[d] set mc = mc + 1 set divb[d] = 0 endloop endif //if the remainder is smaller than the divisor and there are no bits left to gather, exit if (mc < divc2 and 0 == d) then set divb[d] = 0 exitwhen true endif //compare the remainder and the divisor to see which one is greater set d2 = 0 set less = false loop set less = m[d2] < divb2[d2] set d2 = d2 + 1 exitwhen d2 == divc2 or less or m[d2] > divb2[d2] endloop //if less and there are bits remaining, add an additional bit //set the dividend's current bit to 0 IF bits were gathered (division taking place) //if bits weren't gathered, then setting it to 0 will set an already divided bit if (less) then exitwhen 0 == d if (gathered) then set divb[d] = 0 endif set d = d - 1 set m[mc] = divb[d] set mc = mc + 1 set sub = -1 //shift divisor's bits by 1 to account for extra digit in remainder else set sub = 0 //don't shift as there is no extra digit in remainder endif //subtract set divb[d] = 1 set d2 = mc loop set d2 = d2 - 1 //if only subtract if the divisor actually has a bit to do subtracting (remainder might have 1 more bit than divisor) if (d2 + sub > -1) then //if the remainder's current bit is less than the divisor's bit, borrow if (m[d2] < divb2[d2 + sub]) then set m[d2 - 1] = m[d2 - 1] - 1 set m[d2] = m[d2] + 2 endif //subtract them set m[d2] = m[d2] - divb2[d2 + sub] endif exitwhen 0 == d2 endloop //cut out all of the 0s in front of the remainder and shift it over //000033 -> 33 //this first loop goes through all of the 0s loop exitwhen 0 != m[d2] or d2 == mc set d2 = d2 + 1 endloop //this loop removes the 0s by shifting over if (0 < d2) then if (d2 == mc) then set mc = 0 set m[0] = 0 else set d3 = 0 set mc = mc-d2 loop set m[d3] = m[d3+d2] set m[d3+d2] = 0 set d3 = d3 + 1 exitwhen d3 == mc endloop set d3 = 0 loop exitwhen d3 == mc set d3 = d3 + 1 endloop endif endif exitwhen 0 == d endloop //cut out all of the 0s in front of dividend loop exitwhen 0 != divb[divc] set divc = divc - 1 endloop
division
bigint
null
null
null
01/08/2012 11:22:20
not a real question
Cooding BigInt Division === Been trying to code BigInt division for a while. My latest algorithm uses binary division, but somehow I don't think that this is very good. Just looking for some ideas as to what algorithms may be out there ; ). The language I'm working in doesn't support passing things like arrays around or various data types. I'm pretty much stuck with integers and booleans and global arrays as well as local arrays declared at the top of the function. I'm working with a word size of 32768 for increased speed, which happens to be 2^15. Because of this, I can quickly and efficiently convert to base 2 and back, which is why I decided to try a binary division algorithm approach. My first approach caused the remainder to overflow in some situations, but it was extremely fast. My next approach was an idea of polynomial long division. I also tried the quotient idea, although it would fail on extremely big numbers as there would be way too many subtractions involved. Overall, I think that the crappy binary division algorithm may be the best bet ; |. I know that the variable names are ugly, but that is because the lookups get slower with longer variable names, which is just ridiculous >.<. Numbers get smaller towards the end of the divisor and remainder arrays. They are smaller towards the beginning of the dividend array. The final answer is stored in divb with size divc (quotient) and m with size mc (remainder). This thing works with 0 bugs, but I have a feeling that it is just really bad :o. globals private static integer array divb //division binary buffer #1 (to be divided) private static integer divc //division binary count #1 private static integer array divb2 //division binary buffer #2 (to divide) private static integer divc2 //division binary count #2 private static integer dmod //division remainder endglobals Code: local integer d = divc //to be divided int digit count local integer d2 //temp digit 2 local integer d3 //temp digit 3 local integer array m //remainder local integer mc = 0 //remainder count local boolean less //is the remainder < divisor? local integer sub //subtract -1 or 0 (shift the divisor by 1 bit for extra digit) local boolean gathered //were bits gathered? loop //gather bits equal to the length of the divisor only if the current remainder isn't equal to length of divisor and there are bits remaining set gathered = false set gathered = mc != divc2 and 0 != d if (gathered) then loop exitwhen mc == divc2 or 0 == d set d = d - 1 set m[mc] = divb[d] set mc = mc + 1 set divb[d] = 0 endloop endif //if the remainder is smaller than the divisor and there are no bits left to gather, exit if (mc < divc2 and 0 == d) then set divb[d] = 0 exitwhen true endif //compare the remainder and the divisor to see which one is greater set d2 = 0 set less = false loop set less = m[d2] < divb2[d2] set d2 = d2 + 1 exitwhen d2 == divc2 or less or m[d2] > divb2[d2] endloop //if less and there are bits remaining, add an additional bit //set the dividend's current bit to 0 IF bits were gathered (division taking place) //if bits weren't gathered, then setting it to 0 will set an already divided bit if (less) then exitwhen 0 == d if (gathered) then set divb[d] = 0 endif set d = d - 1 set m[mc] = divb[d] set mc = mc + 1 set sub = -1 //shift divisor's bits by 1 to account for extra digit in remainder else set sub = 0 //don't shift as there is no extra digit in remainder endif //subtract set divb[d] = 1 set d2 = mc loop set d2 = d2 - 1 //if only subtract if the divisor actually has a bit to do subtracting (remainder might have 1 more bit than divisor) if (d2 + sub > -1) then //if the remainder's current bit is less than the divisor's bit, borrow if (m[d2] < divb2[d2 + sub]) then set m[d2 - 1] = m[d2 - 1] - 1 set m[d2] = m[d2] + 2 endif //subtract them set m[d2] = m[d2] - divb2[d2 + sub] endif exitwhen 0 == d2 endloop //cut out all of the 0s in front of the remainder and shift it over //000033 -> 33 //this first loop goes through all of the 0s loop exitwhen 0 != m[d2] or d2 == mc set d2 = d2 + 1 endloop //this loop removes the 0s by shifting over if (0 < d2) then if (d2 == mc) then set mc = 0 set m[0] = 0 else set d3 = 0 set mc = mc-d2 loop set m[d3] = m[d3+d2] set m[d3+d2] = 0 set d3 = d3 + 1 exitwhen d3 == mc endloop set d3 = 0 loop exitwhen d3 == mc set d3 = d3 + 1 endloop endif endif exitwhen 0 == d endloop //cut out all of the 0s in front of dividend loop exitwhen 0 != divb[divc] set divc = divc - 1 endloop
1
1,146,962
07/18/2009 07:44:40
136,661
07/11/2009 08:10:23
196
24
Development team : New developer integration process
Developers aren't common human resources...So<br> Which is the best process to integrate New developers in a team ?
untagged
null
null
null
null
02/01/2012 04:10:32
not constructive
Development team : New developer integration process === Developers aren't common human resources...So<br> Which is the best process to integrate New developers in a team ?
4
6,131,387
05/25/2011 21:48:07
258,551
01/25/2010 15:46:51
219
8
Setting multiple properties at once in Powershell
Is there a shorter way to set multiple properties to the same value in Powershell in one command than this? Example: (gi "c:\test.txt").LastWriteTime = (gi "c:\test.txt").LastAccessTime = (gi "c:\test.txt").CreationTime = Get-date I'm just curious if there is a way to shorten this syntax.
syntax
powershell
null
null
null
null
open
Setting multiple properties at once in Powershell === Is there a shorter way to set multiple properties to the same value in Powershell in one command than this? Example: (gi "c:\test.txt").LastWriteTime = (gi "c:\test.txt").LastAccessTime = (gi "c:\test.txt").CreationTime = Get-date I'm just curious if there is a way to shorten this syntax.
0
5,247,478
03/09/2011 14:49:52
611,116
02/10/2011 09:43:15
70
0
Internet explorer dinamyc image loading
I am trying to load images throught javascript. Different browser than IE8 or ie9 it's working fine, but in IE doesn't. If I load the image directly http://localhost/_eWar/index.php?road=map&createimage=true it's working fine, but trought javascript src="index.php?road=map&createimage=true"; this.img_object.object = $("<img>"); this.img_object.object.unbind('load'). removeAttr("src"). removeAttr("width"). removeAttr("height"). attr("class","map newMap"). attr("usemap","#world"). css({ top: 0, left: 0 }). load(function(){ me.image_loaded = true; me.img_object.display_width = me.img_object.orig_width = this.width; me.img_object.display_height = me.img_object.orig_height = this.height; if(!me.container.hasClass("iviewer_cursor")){ me.container.addClass("iviewer_cursor"); } if(me.settings.zoom == "fit"){ me.fit(); } else { me.set_zoom(me.settings.zoom); } if(me.settings.onFinishLoad) { me.settings.onFinishLoad.call(me); } //src attribute is after setting load event, or it won't work }).attr("src",src); I get a "compatible view" message.
javascript
jquery
unobtrusive-javascript
null
null
null
open
Internet explorer dinamyc image loading === I am trying to load images throught javascript. Different browser than IE8 or ie9 it's working fine, but in IE doesn't. If I load the image directly http://localhost/_eWar/index.php?road=map&createimage=true it's working fine, but trought javascript src="index.php?road=map&createimage=true"; this.img_object.object = $("<img>"); this.img_object.object.unbind('load'). removeAttr("src"). removeAttr("width"). removeAttr("height"). attr("class","map newMap"). attr("usemap","#world"). css({ top: 0, left: 0 }). load(function(){ me.image_loaded = true; me.img_object.display_width = me.img_object.orig_width = this.width; me.img_object.display_height = me.img_object.orig_height = this.height; if(!me.container.hasClass("iviewer_cursor")){ me.container.addClass("iviewer_cursor"); } if(me.settings.zoom == "fit"){ me.fit(); } else { me.set_zoom(me.settings.zoom); } if(me.settings.onFinishLoad) { me.settings.onFinishLoad.call(me); } //src attribute is after setting load event, or it won't work }).attr("src",src); I get a "compatible view" message.
0
2,845,174
05/16/2010 19:37:10
202,392
11/04/2009 06:49:57
1,060
46
HTML 5 Peer to Peer Video Possibilities?
Is there anything in HTML 5 that might allow peer to peer video ala Adobe Stratus and Flash 10? There's lots of cool possibilities with P2P video and it'd be nice to build such applications without having to rely on Flash.
html5
p2p
adobe-stratus
null
null
05/31/2012 21:28:35
not constructive
HTML 5 Peer to Peer Video Possibilities? === Is there anything in HTML 5 that might allow peer to peer video ala Adobe Stratus and Flash 10? There's lots of cool possibilities with P2P video and it'd be nice to build such applications without having to rely on Flash.
4
6,930,442
08/03/2011 17:16:57
877,086
08/03/2011 16:56:23
1
0
file browse in Visual C++ 2010 express
I want to browse a text file and pass the path in a variable for file handling operations. Please help me out?
c++
visual-studio-2010
visual
null
null
11/24/2011 22:24:11
not a real question
file browse in Visual C++ 2010 express === I want to browse a text file and pass the path in a variable for file handling operations. Please help me out?
1
2,720,841
04/27/2010 11:49:50
300,596
03/24/2010 07:34:15
3
2
Images get rotated when retrieved from sqliite3 db.
I am making an application which saves the camera roll images as blob in sqlite3 database. When the image is retrieved, its dimensions changes(height and width get interchanged). This happens only on iphone and not on simulator. Please help
iphone
sqlite3
image
null
null
null
open
Images get rotated when retrieved from sqliite3 db. === I am making an application which saves the camera roll images as blob in sqlite3 database. When the image is retrieved, its dimensions changes(height and width get interchanged). This happens only on iphone and not on simulator. Please help
0
6,799,020
07/23/2011 07:39:17
598,630
02/01/2011 15:28:52
51
2
Silverlight printing in web browser problem
I'm trying to print from a Silverlight application. Printing works when I run the application Out Of Browser. But when I run it in the web browser, the Print dialog is shown but nothing happens when I click the buttons (Print, Cancel, or even close the window). I tried running without debugger attached (deployed to IIS) but it's the same thing. The code: private void PrintLabel() { PrintDocument printDocument = new PrintDocument(); printDocument.PrintPage += new EventHandler<PrintPageEventArgs>(printDocument_PrintPage); printDocument.Print("Label for " + this.tbSerialNo.Text); } void printDocument_PrintPage(object sender, PrintPageEventArgs e) { e.PageVisual = this.csLabel; } Am I missing something?
silverlight-4.0
printing
null
null
null
null
open
Silverlight printing in web browser problem === I'm trying to print from a Silverlight application. Printing works when I run the application Out Of Browser. But when I run it in the web browser, the Print dialog is shown but nothing happens when I click the buttons (Print, Cancel, or even close the window). I tried running without debugger attached (deployed to IIS) but it's the same thing. The code: private void PrintLabel() { PrintDocument printDocument = new PrintDocument(); printDocument.PrintPage += new EventHandler<PrintPageEventArgs>(printDocument_PrintPage); printDocument.Print("Label for " + this.tbSerialNo.Text); } void printDocument_PrintPage(object sender, PrintPageEventArgs e) { e.PageVisual = this.csLabel; } Am I missing something?
0
4,346,154
12/03/2010 13:49:50
529,431
12/03/2010 13:27:16
1
0
UIViewController: viewWillAppear is called, viewDidAppear not
In a UIViewController subclass, I have the following methods: -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // do something myTextField.text = @"Default"; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // do something [myTextField selectAll:self]; [myTextField becomeFirstResponder]; } - (void)viewDidLoad { [super viewDidLoad]; // do something myTextField.delegate = self; } The NIB has been created using Interface Builder. The corresponding view controller object is pushed by the navigation controller through pushViewController. The inteded behavior is to show a default text entry in a text field, to select the entire text and to set the text field as first responder. The delegate of the textfield is the controller to catch the cancel/ok actions from the keyboard. I used to have those lines in the viewWillAppear method and it worked well except for the selectAll preselection. Then, I wondered if I have to select the text after the view appeared and thus I moved to code to that method. However, **while methods viewDidLoad and viewWillAppear are called, the method viewDidAppear is not called.** Can anybody tell me why? Most questions I found on the web and here deal with both viewWillAppear/viewDidAppear are not working; I also understood that in subviews or programmatically created views these methods are not evoked; but this does not apply in case and also I wonder why one of these "lifecycle" methods is evoked and the other not. Any idea? Thanks!
iphone
xcode
uiviewcontroller
lifecycle
null
null
open
UIViewController: viewWillAppear is called, viewDidAppear not === In a UIViewController subclass, I have the following methods: -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // do something myTextField.text = @"Default"; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // do something [myTextField selectAll:self]; [myTextField becomeFirstResponder]; } - (void)viewDidLoad { [super viewDidLoad]; // do something myTextField.delegate = self; } The NIB has been created using Interface Builder. The corresponding view controller object is pushed by the navigation controller through pushViewController. The inteded behavior is to show a default text entry in a text field, to select the entire text and to set the text field as first responder. The delegate of the textfield is the controller to catch the cancel/ok actions from the keyboard. I used to have those lines in the viewWillAppear method and it worked well except for the selectAll preselection. Then, I wondered if I have to select the text after the view appeared and thus I moved to code to that method. However, **while methods viewDidLoad and viewWillAppear are called, the method viewDidAppear is not called.** Can anybody tell me why? Most questions I found on the web and here deal with both viewWillAppear/viewDidAppear are not working; I also understood that in subviews or programmatically created views these methods are not evoked; but this does not apply in case and also I wonder why one of these "lifecycle" methods is evoked and the other not. Any idea? Thanks!
0
7,695,496
10/08/2011 07:48:40
485,743
10/24/2010 17:21:38
1,729
9
Javascript libraries for touch devices like iPad
I need to make an important decision regarding selecting the right js framework for my web app. It is going to be the same html running on multiple devices..desktop, tabke, mobile.. As of now, we need to support iPad and iPhone to some extent with possibility to support Android tablet in future... My question is apart from Sencha touch,which are some other good js libraries ? I know Sencha touch is good, but not really sure how to convince the client about that, if the same thing can be done via jQuery related libraries.. My page would have standard touch related things like swipe, drag and drop, accordion related things... Please suggest which library should i go for..like which are optimized for touch devices.. I have heard jQuery mobile is there, but not sure if it is mature enough and good for professional use..
javascript
jquery
ipad
safari
javascript-library
02/07/2012 15:06:40
too localized
Javascript libraries for touch devices like iPad === I need to make an important decision regarding selecting the right js framework for my web app. It is going to be the same html running on multiple devices..desktop, tabke, mobile.. As of now, we need to support iPad and iPhone to some extent with possibility to support Android tablet in future... My question is apart from Sencha touch,which are some other good js libraries ? I know Sencha touch is good, but not really sure how to convince the client about that, if the same thing can be done via jQuery related libraries.. My page would have standard touch related things like swipe, drag and drop, accordion related things... Please suggest which library should i go for..like which are optimized for touch devices.. I have heard jQuery mobile is there, but not sure if it is mature enough and good for professional use..
3
4,613,835
01/06/2011 10:15:40
139,357
07/16/2009 10:05:53
652
10
How to find id of duplicate records in SQL SERVER 2005
Table Entry has the following data. Certain records are duplicate. Duplicate criteria is same NoOfEntry and TypeOfEntry. Out of a record which has same NoOfEntry and TypeOfEntry, i want the EntryId of record which has min(dateOfEntry). For Eg- We have 3 duplicate records for T1, I want record with EntryID 1001 as it was enterd first(minimum DateOfEntry). ![alt text][1] [1]: http://i.stack.imgur.com/g0gnw.png
sql
sql-server-2005
null
null
null
null
open
How to find id of duplicate records in SQL SERVER 2005 === Table Entry has the following data. Certain records are duplicate. Duplicate criteria is same NoOfEntry and TypeOfEntry. Out of a record which has same NoOfEntry and TypeOfEntry, i want the EntryId of record which has min(dateOfEntry). For Eg- We have 3 duplicate records for T1, I want record with EntryID 1001 as it was enterd first(minimum DateOfEntry). ![alt text][1] [1]: http://i.stack.imgur.com/g0gnw.png
0
10,621,269
05/16/2012 15:00:00
1,398,922
05/16/2012 14:44:28
1
0
struts Extjs integration
I want to upload a file. I want to use ExtJs and struts1.I am hunting for the result for last two days. No I am running out of time. Even though I posted in this forum I failed to get the result. After searching a lot I understand that it is very simple to integrate struts and EXTJS . I can't trace out where I am wrong. I know people hear are experts and at the first sight itself they can sort out. OK let me explain my problem My below code without Extjs is working fine My HTML code <html:form method="post" action="/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do" enctype="multipart/form-data" > <table> <tr class="fieldlabel"> <td align="left"> <html:file property="theFile"/> <font color="red"> <html:errors/> </font> </td> </tr> <tr> <td align="center" colspan="2"> <htmlubmit>Upload File</htmlubmit> </td> </tr> </table> </html:form> My struts Action class public class UploadAndSaveAction extends Action { private Logger logger = LogManager.getLogger(UploadAndSaveAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ My struts-config xml file <action attribute="UploadFileFormCsDoc" name="DynaFormBean" path="/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc" type="com.bmtap.apse.projectmgmt.action.UploadAndSaveCsDocAction" scope="request" input="/jsp/view.jsp"> <forward name="success" path="/jsp/project_costingsheet1.jsp" redirect="true"/> <forward name="failure" path="/jsp/project_costingsheet1.jsp" redirect="true"/> </action> They above code with html is uploading file..But I want to upload it using EXTJS. where my problem starts. My ExtJS code var csDocPanel = new Ext.form.FormPanel({ standardSubmit: true, frame:true, title: 'Costing Sheet Documents', width: 970, bodyStyle:'padding:5px 5px 0', defaultType: 'textfield', method: 'post', items: [{ id:'sendFileFieldId', name: 'sendFileField', labelStyle: 'martin:5px; padding:5px; width:200px', inputType: 'file', border: false }], buttons: [{ text: 'Submit', handler: function(button, event) { csDocPanel.getForm().submit({ action:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', method:'POST', failure: function() { Ext.Msg.alert('Error', 'Can not save data.'); } }); } }] }); instead of action:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', I used 1. url:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', 2. url:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', action : this.url 3. Code: csDocPanel.getForm().getEl().dom.action = '/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do'; csDocPanel.getForm().getEl().dom.method = 'POST'; csDocPanel.getForm().submit(); Now I don't know how to proceed further..... I am en counting following problems 1. page is refreshing and nothing is happening for the point 2 2.getting error message 404 /apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do can't find My understanding is i am giving URL wrongly or something wrong with struts config and calling action/url place...But don't know how to rectify .... please help me... I can't align properly sorry
extjs
struts
null
null
null
null
open
struts Extjs integration === I want to upload a file. I want to use ExtJs and struts1.I am hunting for the result for last two days. No I am running out of time. Even though I posted in this forum I failed to get the result. After searching a lot I understand that it is very simple to integrate struts and EXTJS . I can't trace out where I am wrong. I know people hear are experts and at the first sight itself they can sort out. OK let me explain my problem My below code without Extjs is working fine My HTML code <html:form method="post" action="/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do" enctype="multipart/form-data" > <table> <tr class="fieldlabel"> <td align="left"> <html:file property="theFile"/> <font color="red"> <html:errors/> </font> </td> </tr> <tr> <td align="center" colspan="2"> <htmlubmit>Upload File</htmlubmit> </td> </tr> </table> </html:form> My struts Action class public class UploadAndSaveAction extends Action { private Logger logger = LogManager.getLogger(UploadAndSaveAction.class); public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ My struts-config xml file <action attribute="UploadFileFormCsDoc" name="DynaFormBean" path="/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc" type="com.bmtap.apse.projectmgmt.action.UploadAndSaveCsDocAction" scope="request" input="/jsp/view.jsp"> <forward name="success" path="/jsp/project_costingsheet1.jsp" redirect="true"/> <forward name="failure" path="/jsp/project_costingsheet1.jsp" redirect="true"/> </action> They above code with html is uploading file..But I want to upload it using EXTJS. where my problem starts. My ExtJS code var csDocPanel = new Ext.form.FormPanel({ standardSubmit: true, frame:true, title: 'Costing Sheet Documents', width: 970, bodyStyle:'padding:5px 5px 0', defaultType: 'textfield', method: 'post', items: [{ id:'sendFileFieldId', name: 'sendFileField', labelStyle: 'martin:5px; padding:5px; width:200px', inputType: 'file', border: false }], buttons: [{ text: 'Submit', handler: function(button, event) { csDocPanel.getForm().submit({ action:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', method:'POST', failure: function() { Ext.Msg.alert('Error', 'Can not save data.'); } }); } }] }); instead of action:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', I used 1. url:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', 2. url:'/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do', action : this.url 3. Code: csDocPanel.getForm().getEl().dom.action = '/apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do'; csDocPanel.getForm().getEl().dom.method = 'POST'; csDocPanel.getForm().submit(); Now I don't know how to proceed further..... I am en counting following problems 1. page is refreshing and nothing is happening for the point 2 2.getting error message 404 /apse-projectmgmt-portlet/FileUploadAndSaveCsDoc.do can't find My understanding is i am giving URL wrongly or something wrong with struts config and calling action/url place...But don't know how to rectify .... please help me... I can't align properly sorry
0
4,725,659
01/18/2011 15:07:51
484,462
10/22/2010 16:50:07
103
3
How to create 2 application domains for 2 different web applications?
How to create 2 application domains for 2 different web applications?
asp.net-mvc-2
null
null
null
null
null
open
How to create 2 application domains for 2 different web applications? === How to create 2 application domains for 2 different web applications?
0
11,638,749
07/24/2012 20:24:42
33,581
10/25/2008 04:08:22
397
15
Notepad++ Shortcut Mapper
Is there a better Shortcut Mapper plugin for Notepad++? Because, honestly, the default one sucks **big time** - you can't sort by the 'name' or 'shortcut' column and sometimes I end up adding a new shortcut only to realize later that it causes a a conflict, because *it doesn't even warn you!* Seriously, I love Notepad++, but hate the Shortcut Mapper! PS. While writing this question, I found a [list of default shortcuts][1], which helps somewhat! [1]:http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Keyboard_And_Mouse_Shortcuts
notepad++
null
null
null
null
07/25/2012 03:01:12
not constructive
Notepad++ Shortcut Mapper === Is there a better Shortcut Mapper plugin for Notepad++? Because, honestly, the default one sucks **big time** - you can't sort by the 'name' or 'shortcut' column and sometimes I end up adding a new shortcut only to realize later that it causes a a conflict, because *it doesn't even warn you!* Seriously, I love Notepad++, but hate the Shortcut Mapper! PS. While writing this question, I found a [list of default shortcuts][1], which helps somewhat! [1]:http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Keyboard_And_Mouse_Shortcuts
4
3,510,906
08/18/2010 10:01:46
320,624
04/19/2010 17:52:03
128
5
Is there a tool for converting JavaScript to CoffeeScript?
I'd love to use CoffeeScript, but converting all my JavaScript files doesn't seem like a task I should have to do by hand...
javascript
coffeescript
null
null
null
07/21/2012 22:28:20
not constructive
Is there a tool for converting JavaScript to CoffeeScript? === I'd love to use CoffeeScript, but converting all my JavaScript files doesn't seem like a task I should have to do by hand...
4
1,676,758
11/04/2009 21:30:40
118,175
06/05/2009 17:52:19
461
16
PHP Paypal Class
Could anybody recommend a up-to-date class (or payment system) for handling paypal recurring payments with PHP? Thank you!
paypal-subscriptions
paypal
php
php5
null
null
open
PHP Paypal Class === Could anybody recommend a up-to-date class (or payment system) for handling paypal recurring payments with PHP? Thank you!
0
11,143,559
06/21/2012 17:31:09
206,504
09/29/2009 18:41:33
1,381
5
Clean up RAM (Maybe win32 api)?
Every so often I see "Speed Up Your PC" programs that offer a RAM cleaning feature. They claim to defrag and free up unused memory like a garbage collector or something... not sure. Here are some examples: http://www.softpedia.com/get/Tweak/Memory-Tweak/Clean-Ram.shtml http://download.cnet.com/Instant-Memory-Cleaner/3000-2086_4-10571833.html http://www.uniblue.com/software/speedupmypc/ I'm interested in learning about the Win32 C API's that they are using, if anyone has knowledge. I've heard about the ProcessIdleTasks() in advapi32.dll trick, but doesn't look too legit looking at the documentation on that function.
c++
c
winapi
memory
ram
null
open
Clean up RAM (Maybe win32 api)? === Every so often I see "Speed Up Your PC" programs that offer a RAM cleaning feature. They claim to defrag and free up unused memory like a garbage collector or something... not sure. Here are some examples: http://www.softpedia.com/get/Tweak/Memory-Tweak/Clean-Ram.shtml http://download.cnet.com/Instant-Memory-Cleaner/3000-2086_4-10571833.html http://www.uniblue.com/software/speedupmypc/ I'm interested in learning about the Win32 C API's that they are using, if anyone has knowledge. I've heard about the ProcessIdleTasks() in advapi32.dll trick, but doesn't look too legit looking at the documentation on that function.
0
11,323,998
07/04/2012 07:03:59
1,500,752
07/04/2012 06:51:38
1
0
Symantec anti virus scan through command line
How to scan file through Symantec software through command line and read the file scanning status? I have tried with command like DoScan.exe /cmdlinescan /ScanFile "C:\Test.dat". It executed but no result. I have checked in symantec logs with todays folder and it is not listing the scanned file status. Test.dat is not virus file and i used this for testing only. Thanks for any help. Aruna
java
null
null
null
null
07/04/2012 20:49:17
off topic
Symantec anti virus scan through command line === How to scan file through Symantec software through command line and read the file scanning status? I have tried with command like DoScan.exe /cmdlinescan /ScanFile "C:\Test.dat". It executed but no result. I have checked in symantec logs with todays folder and it is not listing the scanned file status. Test.dat is not virus file and i used this for testing only. Thanks for any help. Aruna
2
6,372,377
06/16/2011 13:06:48
792,738
06/10/2011 12:26:23
1
0
PhoneGap App but using Objective C?
is there a way to use this http://www.edumobile.org/iphone/iphone-programming-tutorials/parsing-an-xml-file/comment-page-1/#comment-2868 Objective C Parser instead of an jquery xml parser in an PhoneGap Application?
phonegap
null
null
null
null
06/18/2011 01:13:22
not a real question
PhoneGap App but using Objective C? === is there a way to use this http://www.edumobile.org/iphone/iphone-programming-tutorials/parsing-an-xml-file/comment-page-1/#comment-2868 Objective C Parser instead of an jquery xml parser in an PhoneGap Application?
1
10,722,622
05/23/2012 14:59:53
1,253,847
03/07/2012 05:00:45
127
2
How to add icon in button when slide down in jquery
I did some code for jquery sliding-toggle div but for now i want to adding icon in button when sliding down i want to show a small arrow icon bottom of the open content button. when i click again on open content button that icon want to remove. go through the following path for see the code. [enter link description here][1] [1]: http://jsfiddle.net/sureshsummy/2kQXW/23/
jquery
null
null
null
null
05/24/2012 20:46:13
not a real question
How to add icon in button when slide down in jquery === I did some code for jquery sliding-toggle div but for now i want to adding icon in button when sliding down i want to show a small arrow icon bottom of the open content button. when i click again on open content button that icon want to remove. go through the following path for see the code. [enter link description here][1] [1]: http://jsfiddle.net/sureshsummy/2kQXW/23/
1
5,788,489
04/26/2011 09:35:48
388,388
07/10/2010 10:12:11
1,620
150
Unknown server tag cc1:modalpopupextender in 2005
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> This is my design i am getting the error as unknown server tag cc1:modalpopupextender <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Arial" Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="CheckAll" onclick="return check_uncheck (this );" runat="server" /> </HeaderTemplate> <ItemTemplate> <asp:Label ID="ID" Visible="false" Text='<%# DataBinder.Eval (Container.DataItem, "Id") %>' runat="server" /> <asp:CheckBox ID="deleteRec" onclick="return check_uncheck (this );" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Id" SortExpression="Id"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Id") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("Id") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="FileName" SortExpression="FileName"> <EditItemTemplate> <asp:Label ID="LblFileName" runat="server" Text='<%# Eval("File_Name") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="LblFileName1" runat="server" Text='<%# Bind("File_Name") %>'></asp:Label> <asp:ImageButton ID="img" runat="Server" CommandName="Image" ImageUrl="~/images/view1.png" /> </ItemTemplate> </asp:TemplateField> </Columns> <AlternatingRowStyle BackColor="White" /> <RowStyle BackColor="#F7F7DE" /> <FooterStyle BackColor="#CCCC99" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> </asp:GridView> <asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none; height: auto; width: auto;"> <br /> <table align="center"> <tr> <td> <asp:GridView ID="dynamicGridView" runat="server" AutoGenerateColumns="True" Font-Names="Courier New" Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4"> <AlternatingRowStyle BackColor="White" /> <RowStyle BackColor="#F7F7DE" /> <FooterStyle BackColor="#CCCC99" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> </asp:GridView> </td> </tr> <tr> <td align="center"> <asp:Button ID="btnCancel" runat="server" Text="Ok" OnClientClick="return Hidepopup()" /> </td> </tr> </table> </asp:Panel> <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton> <cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit" TargetControlID="lnkFake" BackgroundCssClass="modalBackground"> </cc1:ModalPopupExtender> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="GridView1" /> </Triggers> </asp:UpdatePanel> </form> Can any one help me out i am doing this in 2005
asp.net
ajax
visual-studio-2005
null
null
null
open
Unknown server tag cc1:modalpopupextender in 2005 === <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> This is my design i am getting the error as unknown server tag cc1:modalpopupextender <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Arial" Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="CheckAll" onclick="return check_uncheck (this );" runat="server" /> </HeaderTemplate> <ItemTemplate> <asp:Label ID="ID" Visible="false" Text='<%# DataBinder.Eval (Container.DataItem, "Id") %>' runat="server" /> <asp:CheckBox ID="deleteRec" onclick="return check_uncheck (this );" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Id" SortExpression="Id"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Id") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("Id") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="FileName" SortExpression="FileName"> <EditItemTemplate> <asp:Label ID="LblFileName" runat="server" Text='<%# Eval("File_Name") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="LblFileName1" runat="server" Text='<%# Bind("File_Name") %>'></asp:Label> <asp:ImageButton ID="img" runat="Server" CommandName="Image" ImageUrl="~/images/view1.png" /> </ItemTemplate> </asp:TemplateField> </Columns> <AlternatingRowStyle BackColor="White" /> <RowStyle BackColor="#F7F7DE" /> <FooterStyle BackColor="#CCCC99" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> </asp:GridView> <asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none; height: auto; width: auto;"> <br /> <table align="center"> <tr> <td> <asp:GridView ID="dynamicGridView" runat="server" AutoGenerateColumns="True" Font-Names="Courier New" Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4"> <AlternatingRowStyle BackColor="White" /> <RowStyle BackColor="#F7F7DE" /> <FooterStyle BackColor="#CCCC99" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> </asp:GridView> </td> </tr> <tr> <td align="center"> <asp:Button ID="btnCancel" runat="server" Text="Ok" OnClientClick="return Hidepopup()" /> </td> </tr> </table> </asp:Panel> <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton> <cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit" TargetControlID="lnkFake" BackgroundCssClass="modalBackground"> </cc1:ModalPopupExtender> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="GridView1" /> </Triggers> </asp:UpdatePanel> </form> Can any one help me out i am doing this in 2005
0
11,140,243
06/21/2012 14:20:10
1,309,847
04/03/2012 08:00:18
27
0
Express.js (node.js) + socket.io + backbone.js
I want to dive in to JavaScript (client- and server-side) programming. Usually I always used Symfony2 (PHP-Framework) with some jQuery for effects/ajax. But there comes the time where this isn't enough anymore (Realtime apps). I now found out that Express.js and Backbone.js both rather use a JSON-Rest Interface to communicate. So how can I now tell Express.js and Backbone.js to use Websockets? I read existing threads about this topic where the result was that it is quite difficult to programm because the frameworks don't support this naturally. So what is the recent state of using Express.js and Backbone.js with Websockets? EDIT: By the way is this maybe the wrong approach and should I only start with Express.js than Backbone.js?
javascript
node.js
backbone.js
express
socket.io
06/21/2012 14:47:42
not a real question
Express.js (node.js) + socket.io + backbone.js === I want to dive in to JavaScript (client- and server-side) programming. Usually I always used Symfony2 (PHP-Framework) with some jQuery for effects/ajax. But there comes the time where this isn't enough anymore (Realtime apps). I now found out that Express.js and Backbone.js both rather use a JSON-Rest Interface to communicate. So how can I now tell Express.js and Backbone.js to use Websockets? I read existing threads about this topic where the result was that it is quite difficult to programm because the frameworks don't support this naturally. So what is the recent state of using Express.js and Backbone.js with Websockets? EDIT: By the way is this maybe the wrong approach and should I only start with Express.js than Backbone.js?
1
10,843,551
06/01/2012 02:06:11
139,190
07/16/2009 04:57:33
18
0
Does blobstore service retain the file creation date (not upload date)?
How can I capture the original file creation date of an image file that's been uploaded to the blobstore? All similar questions/answers seem to refer to the *upload* date of the image. I'm interested in the date at which (in this case) the photo was taken. Btw, my apologies if this is a total newb question.
image
gwt
date
blobstore
creation
06/02/2012 04:04:54
not a real question
Does blobstore service retain the file creation date (not upload date)? === How can I capture the original file creation date of an image file that's been uploaded to the blobstore? All similar questions/answers seem to refer to the *upload* date of the image. I'm interested in the date at which (in this case) the photo was taken. Btw, my apologies if this is a total newb question.
1
11,085,612
06/18/2012 15:04:17
643,913
03/04/2011 00:45:37
172
2
Chrome developer tools javascript version
When I open the Chrome Developer Tools JavaScript console to get a REPL, the version of JavaScript it uses seems lower than 1.8. `let` statements, new style functions, etc. give me syntax errors. Is there any way to change the JavaScript version used? Thanks in advance.
javascript
google-chrome-devtools
null
null
null
null
open
Chrome developer tools javascript version === When I open the Chrome Developer Tools JavaScript console to get a REPL, the version of JavaScript it uses seems lower than 1.8. `let` statements, new style functions, etc. give me syntax errors. Is there any way to change the JavaScript version used? Thanks in advance.
0
5,661,433
04/14/2011 09:53:35
690,929
04/04/2011 10:39:05
128
11
Is it good practice to also trim form inputs as well as escape characters?
Like this, $type = mysqli_real_escape_string($dbc, trim($_POST['type'])); Does the trim improve security or does the mysqli_real_escape_string do enough already?
php
security
mysqli
null
null
null
open
Is it good practice to also trim form inputs as well as escape characters? === Like this, $type = mysqli_real_escape_string($dbc, trim($_POST['type'])); Does the trim improve security or does the mysqli_real_escape_string do enough already?
0
9,267,240
02/13/2012 20:05:53
781,729
06/02/2011 19:21:03
1
0
Can I access the geometery of a the Sphere class without extending?
I'm trying to create a generic abstract superclass for all 3d objects in a Java3D program I am writing. I need this to add shared functionality, such as moving objects, to all 3d objects via a common interface. I would like to use the pre-existing geometry of the Sphere class to create my own sphere3d object. I want to be able to access the geometry of the Sphere class without inheriting it, as my object3d abstract class extends Shape3D and thus subclasses must inherit object3d. Is there a way to set the geometry of my own sphere3d class (which extends object3d) to that of Sphere? The geometry is all I need. Thank you for your time
java
inheritance
geometry
java-3d
extends
null
open
Can I access the geometery of a the Sphere class without extending? === I'm trying to create a generic abstract superclass for all 3d objects in a Java3D program I am writing. I need this to add shared functionality, such as moving objects, to all 3d objects via a common interface. I would like to use the pre-existing geometry of the Sphere class to create my own sphere3d object. I want to be able to access the geometry of the Sphere class without inheriting it, as my object3d abstract class extends Shape3D and thus subclasses must inherit object3d. Is there a way to set the geometry of my own sphere3d class (which extends object3d) to that of Sphere? The geometry is all I need. Thank you for your time
0
10,093,010
04/10/2012 16:53:29
1,062,764
11/23/2011 21:00:24
307
25
Can anyone recommend a good PHP ORM with compatibility for MongoDB?
I'm looking for a good PHP ORM framework for MongoDB. I haven't stumbled onto anything that I was really thrilled about yet. Perhaps someone could point me at a few packages that I haven't seen yet. Thanks.
php
mongodb
null
null
null
04/12/2012 02:57:21
not constructive
Can anyone recommend a good PHP ORM with compatibility for MongoDB? === I'm looking for a good PHP ORM framework for MongoDB. I haven't stumbled onto anything that I was really thrilled about yet. Perhaps someone could point me at a few packages that I haven't seen yet. Thanks.
4
3,203,029
07/08/2010 11:25:04
372,630
06/21/2010 22:17:06
21
1
jQuery UI Autcomplete - hyperlink results
By default the jQuery U Autocomplete produces a list of results, upon clicking on a result it will populate the text field with the clicked result text. I would like to change this behaviour, so that when clicking on a result it will take you to that result's page. To generate the hyperlink I can pass in the ID of the result. I'm using PHP JSON to bring back the resultset: $return_arr = array(); while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) { $row_array['id'] = $row['id']; $row_array['value'] = $row['name']; array_push($return_arr, $row_array); } echo json_encode($return_arr); And here is my current jQuery: $(function() { $("#searchcompany").autocomplete( { source: "companies.php", minLength: 2 }); });
jquery-ui
jquery-ui-autocomplete
null
null
null
null
open
jQuery UI Autcomplete - hyperlink results === By default the jQuery U Autocomplete produces a list of results, upon clicking on a result it will populate the text field with the clicked result text. I would like to change this behaviour, so that when clicking on a result it will take you to that result's page. To generate the hyperlink I can pass in the ID of the result. I'm using PHP JSON to bring back the resultset: $return_arr = array(); while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) { $row_array['id'] = $row['id']; $row_array['value'] = $row['name']; array_push($return_arr, $row_array); } echo json_encode($return_arr); And here is my current jQuery: $(function() { $("#searchcompany").autocomplete( { source: "companies.php", minLength: 2 }); });
0
1,342,510
08/27/2009 17:20:12
6,618
09/15/2008 12:22:19
112
5
mod_rewrite: setting GET depending on HTTP_HOST
I recently discovered the power of the mod_rewrite module and I need some help with it. Say I have a website which has two domain names mapping to the same host... example.com example.net And I would like to set a GET var depending on the the HTTP_HOST (i.e. .com OR .net ?) ... /index.php?lang=en /index.php?lang=es However the caveat is this.. I already have 3 RewriteRules... RewriteRule ^(about|contact)/?$ /index.php?page=$1 [NC] ... .. And if I were to follow the example over [here](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteCond) (bottom of RewriteCond) I would have to copy the 3 RewriteRules for each HTTP_HOST (i.e. .com OR .net) and add the GET var statically like; &lang=en OR &lang=es and the end of each rule... Is there some way to do this automatically without having to copy the 3 rules all over again which only differ by just one get var at the end? PS. I know this can be done through the scripting language, but I was wondering if this can be done through mod_rewrite, and how. thanx!
apache
mod-rewrite
get
null
null
null
open
mod_rewrite: setting GET depending on HTTP_HOST === I recently discovered the power of the mod_rewrite module and I need some help with it. Say I have a website which has two domain names mapping to the same host... example.com example.net And I would like to set a GET var depending on the the HTTP_HOST (i.e. .com OR .net ?) ... /index.php?lang=en /index.php?lang=es However the caveat is this.. I already have 3 RewriteRules... RewriteRule ^(about|contact)/?$ /index.php?page=$1 [NC] ... .. And if I were to follow the example over [here](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteCond) (bottom of RewriteCond) I would have to copy the 3 RewriteRules for each HTTP_HOST (i.e. .com OR .net) and add the GET var statically like; &lang=en OR &lang=es and the end of each rule... Is there some way to do this automatically without having to copy the 3 rules all over again which only differ by just one get var at the end? PS. I know this can be done through the scripting language, but I was wondering if this can be done through mod_rewrite, and how. thanx!
0
7,987,652
11/02/2011 21:40:20
315,908
11/23/2009 21:11:24
531
17
Migrating an App to High-Replication Datastore - now ancestor issues
Following these instructions: http://neogregious.blogspot.com/2011/04/migrating-app-to-high-replication.html I have managed to migrate to the high replication datastore however I am now getting the following exception: datastore_errors.BadArgumentError('ancestor argument should match app ("%r" != "%r")' % (ancestor.app(), app)) The new app name has not been assigned to the ancestor model data. At the moment the data is returned however the logs are being populated with this exception message. Is there a way to manually set the app on the model data? Could I do something like this to resolve this? if( ancestor.app() != app ) set_app('my_app') put() Before I do this or apply any other HACK is there something I should have done as part of the data migration?
google-app-engine
gae-datastore
null
null
null
null
open
Migrating an App to High-Replication Datastore - now ancestor issues === Following these instructions: http://neogregious.blogspot.com/2011/04/migrating-app-to-high-replication.html I have managed to migrate to the high replication datastore however I am now getting the following exception: datastore_errors.BadArgumentError('ancestor argument should match app ("%r" != "%r")' % (ancestor.app(), app)) The new app name has not been assigned to the ancestor model data. At the moment the data is returned however the logs are being populated with this exception message. Is there a way to manually set the app on the model data? Could I do something like this to resolve this? if( ancestor.app() != app ) set_app('my_app') put() Before I do this or apply any other HACK is there something I should have done as part of the data migration?
0
2,366,357
03/02/2010 20:04:34
10,119
09/15/2008 21:17:45
495
10
WPF Memory Leak but only when total document footprint exceeds threshold.
WPF Memory Leak Problem. Memory stable with small documents, but grows until OOM exception with large documents. Background: We've developed a WPF application for controlling a dynamic display. There is a Design component, where the user lays out the display document, and a document Display component. Elements in the display can contain text and/or graphics. Each element can cycle through different strings or images using various transitions--scrolling, fading, flashing, etc. Problem: The problem is with an element displaying graphics, with a cross-fade between different graphics. The fade is accomplished by animating the opacity property of two WPF image controls (one for incoming, one for outgoing). Everything works fine as long as the total memory footprint of the application while running is below a (not yet precisely defined) threshold. When the total foot print increases (for example, by adding another graphic element with a large graphic) then the total memory used by the application begins to grow, and I'm eventually presented with an OOM exception. The large graphic on its own, or the fading graphics on its own do not have the memory leak problem, but only the combination. Has anyone else seen similar behavior? Any ideas for a solution? I'm guessing that the problem has something to do with Large Object Heap fragmentation, but this is only a guess. Unfortunately, I don't have sample code to post as this is part of a larger solution. I will try to create a sample app that illustrates this behavior and update my post.
wpf
memory-leaks
null
null
null
null
open
WPF Memory Leak but only when total document footprint exceeds threshold. === WPF Memory Leak Problem. Memory stable with small documents, but grows until OOM exception with large documents. Background: We've developed a WPF application for controlling a dynamic display. There is a Design component, where the user lays out the display document, and a document Display component. Elements in the display can contain text and/or graphics. Each element can cycle through different strings or images using various transitions--scrolling, fading, flashing, etc. Problem: The problem is with an element displaying graphics, with a cross-fade between different graphics. The fade is accomplished by animating the opacity property of two WPF image controls (one for incoming, one for outgoing). Everything works fine as long as the total memory footprint of the application while running is below a (not yet precisely defined) threshold. When the total foot print increases (for example, by adding another graphic element with a large graphic) then the total memory used by the application begins to grow, and I'm eventually presented with an OOM exception. The large graphic on its own, or the fading graphics on its own do not have the memory leak problem, but only the combination. Has anyone else seen similar behavior? Any ideas for a solution? I'm guessing that the problem has something to do with Large Object Heap fragmentation, but this is only a guess. Unfortunately, I don't have sample code to post as this is part of a larger solution. I will try to create a sample app that illustrates this behavior and update my post.
0
6,823,853
07/26/2011 00:00:33
796,837
06/14/2011 00:36:34
119
0
Programming language to use with MySQL: Java or C++?
I don't know much of either languages, but what would be better for writing applications that deals with the following. Right now, I use PHP, but I'm looking to see what would be the next ideal language to dig into, if the needs arise. - MySQL - off-line data processing of CSV, XML, etc. files - web applications (dynamic websites) I understand that this could quite possibly be subjective.. so if you could just pitch in some pros and cons, that would be superb. TIA!
java
php
c++
mysql
null
07/26/2011 00:07:18
not constructive
Programming language to use with MySQL: Java or C++? === I don't know much of either languages, but what would be better for writing applications that deals with the following. Right now, I use PHP, but I'm looking to see what would be the next ideal language to dig into, if the needs arise. - MySQL - off-line data processing of CSV, XML, etc. files - web applications (dynamic websites) I understand that this could quite possibly be subjective.. so if you could just pitch in some pros and cons, that would be superb. TIA!
4
2,701,698
04/23/2010 20:14:02
48,082
12/21/2008 03:44:34
20,005
998
emacs/elisp: What is the hash (pound, number sign, octothorp) symbol used for?
What does this do? (add-hook 'compilation-mode-hook #'my-setup-compile-mode) ...and is it different than (add-hook 'compilation-mode-hook 'my-setup-compile-mode)
emacs
elisp
null
null
null
null
open
emacs/elisp: What is the hash (pound, number sign, octothorp) symbol used for? === What does this do? (add-hook 'compilation-mode-hook #'my-setup-compile-mode) ...and is it different than (add-hook 'compilation-mode-hook 'my-setup-compile-mode)
0
8,710,855
01/03/2012 10:29:41
980,778
10/05/2011 16:29:33
29
0
How to retrieve data from database with mysql_real_escape_string
I've inserted a string with `mysql_real_escape_string()` into a table $str = 'wo\n'; $a = mysql_real_escape_string($str); mysql_query("INSERT INTO tname VALUES('". $a ."'); then how to retrieve the string from the table? this doesn't work: $q = mysql_real_escape_string('wo\n'); //this doesn't work $q = 'wo\n'; //doesn't work mysql_query("SELECT * FROM tname WHERE c1 LIKE '%". $q ."%'"); note: **magic_qoutes_gpc = off** **and I have to use LIKE statement in SELECT clause** **no typo and no syntax error**
php
mysql
null
null
null
03/09/2012 17:24:53
too localized
How to retrieve data from database with mysql_real_escape_string === I've inserted a string with `mysql_real_escape_string()` into a table $str = 'wo\n'; $a = mysql_real_escape_string($str); mysql_query("INSERT INTO tname VALUES('". $a ."'); then how to retrieve the string from the table? this doesn't work: $q = mysql_real_escape_string('wo\n'); //this doesn't work $q = 'wo\n'; //doesn't work mysql_query("SELECT * FROM tname WHERE c1 LIKE '%". $q ."%'"); note: **magic_qoutes_gpc = off** **and I have to use LIKE statement in SELECT clause** **no typo and no syntax error**
3
10,127,530
04/12/2012 16:12:36
466,534
04/21/2010 12:03:08
2,542
9
chck if two single linked list contains same data
we have to check if two given linked list contains same data,orders in this case does not matter,meaning that `{1,3,2}` and `{2,1,3}`are same,i think that we should introduce new variable `counter=0` and do following procedure while(node1->next!=NULL) { int value=node1->value; if(contains(node2,value)){ counter++; } node1=node1->next; if(counter== number of elements in node 1) return true; else return false; } another method is sort both list and compare node by node,which one is optimal?in first case it takes O(n^2) operation,while in second case like Nlog(N)+O(N),(if we use merge sort)so am i right in my thinking?or is there another optimal method?
c++
linked-list
compare
null
null
null
open
chck if two single linked list contains same data === we have to check if two given linked list contains same data,orders in this case does not matter,meaning that `{1,3,2}` and `{2,1,3}`are same,i think that we should introduce new variable `counter=0` and do following procedure while(node1->next!=NULL) { int value=node1->value; if(contains(node2,value)){ counter++; } node1=node1->next; if(counter== number of elements in node 1) return true; else return false; } another method is sort both list and compare node by node,which one is optimal?in first case it takes O(n^2) operation,while in second case like Nlog(N)+O(N),(if we use merge sort)so am i right in my thinking?or is there another optimal method?
0
9,867,242
03/26/2012 05:50:49
1,430,003
02/22/2011 10:22:46
6
0
Write a Java class to sort 10 billion integers
how to write a Java class to sort 10 billion integers, assuming we can only fit a subset of them in memory at once. I have done sorting but questions is how i would get the 1 billion values ? How I am gonna sort them if i am going to load a portion of them in memory ? If you can help me with source code it would be much appreciated. Thanks in advance.
java
algorithm
sorting
null
null
03/26/2012 16:11:38
not a real question
Write a Java class to sort 10 billion integers === how to write a Java class to sort 10 billion integers, assuming we can only fit a subset of them in memory at once. I have done sorting but questions is how i would get the 1 billion values ? How I am gonna sort them if i am going to load a portion of them in memory ? If you can help me with source code it would be much appreciated. Thanks in advance.
1
8,447,337
12/09/2011 14:58:25
437,242
09/01/2010 18:22:44
114
0
questions about nmap
i have several questions about nmap: first, nmap can detect servers via: - link-layer - network-layer - transport-layer where are the differences (not in the layer, but in the way how nmap does it) and how does nmap do this? second, when i make a port scan with nmap, the UDP scan takes much longer then the TCP scan, why? third: are there any different methods to explore the OS then to use the `-O --osscan-guess` command (i mean totally different, not e.g. just add `--fuzzy`)
unix
networking
nmap
null
null
12/09/2011 15:29:07
off topic
questions about nmap === i have several questions about nmap: first, nmap can detect servers via: - link-layer - network-layer - transport-layer where are the differences (not in the layer, but in the way how nmap does it) and how does nmap do this? second, when i make a port scan with nmap, the UDP scan takes much longer then the TCP scan, why? third: are there any different methods to explore the OS then to use the `-O --osscan-guess` command (i mean totally different, not e.g. just add `--fuzzy`)
2
7,625,986
10/02/2011 11:07:50
975,325
10/02/2011 11:01:36
1
0
Zend_From Validator only if the field input has changed?
I'm writing a Backend System and I want to allow the users to change their email adress. I've written a custom validator to check if the email-adress the user has entered already exists in my database. Now I ran into a problem: The form is populated with the user data, so his email adress is the default value of the email field. Now if the user submits the form, my validators throws an error, because (of course) this email adress does alreday exist! How can I solve this problem? Mybe a Validator is not the right approach to do this? Or is there a solution to detect if the user changed the default value and fire the validator only in that case? Thanks very much Matthias
zend-framework
zend-form
zend-validate
null
null
null
open
Zend_From Validator only if the field input has changed? === I'm writing a Backend System and I want to allow the users to change their email adress. I've written a custom validator to check if the email-adress the user has entered already exists in my database. Now I ran into a problem: The form is populated with the user data, so his email adress is the default value of the email field. Now if the user submits the form, my validators throws an error, because (of course) this email adress does alreday exist! How can I solve this problem? Mybe a Validator is not the right approach to do this? Or is there a solution to detect if the user changed the default value and fire the validator only in that case? Thanks very much Matthias
0
2,164,552
01/29/2010 19:24:06
55,896
01/16/2009 16:18:59
1,037
39
C# explicit casting of derived types
If I create class A, and class B inherits from class A, why does C# require me to explicitly cast between them? For example: public class Mammal { } public class Dog : Mammal { } ... Mammal foo = new Dog(); // Invalid, wants an explicit cast Mammal bar = (Mammal)new Dog(); // This one works I'm just curious what the reasoning is behind that restriction.
c#
casting
class
inheritance
null
null
open
C# explicit casting of derived types === If I create class A, and class B inherits from class A, why does C# require me to explicitly cast between them? For example: public class Mammal { } public class Dog : Mammal { } ... Mammal foo = new Dog(); // Invalid, wants an explicit cast Mammal bar = (Mammal)new Dog(); // This one works I'm just curious what the reasoning is behind that restriction.
0
5,250,659
03/09/2011 18:49:31
652,189
03/09/2011 18:49:31
1
0
[Delphi] Webbrowser is not working
**This is my code** ; procedure TForm1.Button2Click(Sender: TObject); begin EmbeddedWB1.Navigate(combobox3.text+'/BeO/webroot/index.php?module=kings'); While EmbeddedWB1.ReadyState <> READYSTATE_Complete do Application.ProcessMessages; Sleep(1); Application.ProcessMessages; if VarIsClear(EmbeddedWb1.OleObject.Document.getElementByID('asc12')) then begin Application.ProcessMessages; Sleep(1); Application.ProcessMessages; end else begin Sleep(500); Keybd_Event(VK_RETURN, 1, 0, 0); Application.ProcessMessages; end; end; **I have question : thatz code not working,website is loaded but "keybd event" not usin. just web page refreshing too much. Help Me Thankz. **
delphi
embedded
webbrowser
null
null
03/10/2011 03:51:11
not a real question
[Delphi] Webbrowser is not working === **This is my code** ; procedure TForm1.Button2Click(Sender: TObject); begin EmbeddedWB1.Navigate(combobox3.text+'/BeO/webroot/index.php?module=kings'); While EmbeddedWB1.ReadyState <> READYSTATE_Complete do Application.ProcessMessages; Sleep(1); Application.ProcessMessages; if VarIsClear(EmbeddedWb1.OleObject.Document.getElementByID('asc12')) then begin Application.ProcessMessages; Sleep(1); Application.ProcessMessages; end else begin Sleep(500); Keybd_Event(VK_RETURN, 1, 0, 0); Application.ProcessMessages; end; end; **I have question : thatz code not working,website is loaded but "keybd event" not usin. just web page refreshing too much. Help Me Thankz. **
1
5,743,247
04/21/2011 11:06:49
569,776
01/10/2011 11:39:39
44
1
Skip add to array
I know that with continue you can skip certains parts of scripts. But is there a way to do the same thing with an array. For example: I want that every object is stored in an array, but not the object(wich also has the same tag) wich wears this script. var enemies : GameObject[]; function Start(){ seeEnemies(); } function seeEnemies():GameObject{ enemies = GameObject.FindGameObjectsWithTag("enemy"); } Thanks in advance :)
javascript
unity3d
null
null
null
null
open
Skip add to array === I know that with continue you can skip certains parts of scripts. But is there a way to do the same thing with an array. For example: I want that every object is stored in an array, but not the object(wich also has the same tag) wich wears this script. var enemies : GameObject[]; function Start(){ seeEnemies(); } function seeEnemies():GameObject{ enemies = GameObject.FindGameObjectsWithTag("enemy"); } Thanks in advance :)
0
8,120,894
11/14/2011 11:29:07
1,045,346
11/14/2011 10:04:20
1
0
Which tools or tecnologies should I use for desgin layouts in my web Application?
I'm using the Django framework for the development of a Digital Signage project. I need some tool or technology that can be used with this framework and let me design the layouts (that is the finally content display on the screens) in a web application in a simple way such as create, select, drag and drop regions Within a frame Which to allocate resources such as: images, videos or channels that are available. The problem is I do not know the tools and technologies that could be used. Any information would be useful to me. Thanks in advance.
design
web-applications
null
null
null
11/14/2011 19:49:41
not constructive
Which tools or tecnologies should I use for desgin layouts in my web Application? === I'm using the Django framework for the development of a Digital Signage project. I need some tool or technology that can be used with this framework and let me design the layouts (that is the finally content display on the screens) in a web application in a simple way such as create, select, drag and drop regions Within a frame Which to allocate resources such as: images, videos or channels that are available. The problem is I do not know the tools and technologies that could be used. Any information would be useful to me. Thanks in advance.
4
7,935,917
10/28/2011 23:32:57
742,703
05/07/2011 03:53:45
103
0
Problems establish VPN connection to workplace on Windows 7
Hi i just got a graduate developer job and for me to explore the codebase at home they allowed me access via VPN. My computer is running Windows 7 but when i tried to connect I kept on getting this error message. I turned off my Windows firewall like recommended but still to no avail. ![enter image description here][1] [1]: http://i.stack.imgur.com/Z904I.jpg Does anyone know what im dong wrong? All my colleagues have all been able to connect easily with XP. Thanks guys
windows-7
vpn
null
null
null
10/29/2011 02:18:21
off topic
Problems establish VPN connection to workplace on Windows 7 === Hi i just got a graduate developer job and for me to explore the codebase at home they allowed me access via VPN. My computer is running Windows 7 but when i tried to connect I kept on getting this error message. I turned off my Windows firewall like recommended but still to no avail. ![enter image description here][1] [1]: http://i.stack.imgur.com/Z904I.jpg Does anyone know what im dong wrong? All my colleagues have all been able to connect easily with XP. Thanks guys
2
8,709,366
01/03/2012 07:57:57
1,077,223
12/02/2011 10:47:08
1
0
implementing authentication in soap sever
i am trying to create a soap server in Java. i want to implement the authentication in the soap server so that which ever soap client is accessing should access using username and password. all the examples in the net is showing, passing the authentication to server from client.
java
null
null
null
null
01/03/2012 10:24:02
not a real question
implementing authentication in soap sever === i am trying to create a soap server in Java. i want to implement the authentication in the soap server so that which ever soap client is accessing should access using username and password. all the examples in the net is showing, passing the authentication to server from client.
1
7,700,193
10/08/2011 22:32:39
247,542
01/10/2010 16:35:34
2,993
99
PIL Cannot Handle This Data Type
I'm attempting to use the fft module in numpy: import Image, numpy i = Image.open('img.png') a = numpy.asarray(i, numpy.uint8) b = abs(numpy.fft.rfft2(a)) b = numpy.uint8(b) j = Image.fromarray(b) j.save('img2.png') However, when I try and convert the numpy array back to a PIL image, I get the error: TypeError: Cannot handle this data type However, both a and b arrays appear to have the same data type (uint8), and doing `Image.fromarray(a)` runs fine. I do notice the shapes are slightly different (a.shape = (1840, 3264, 3) vs b.shape = (1840, 3264, 2)). I do fix this and find out which data types PIL accepts?
python
numpy
pil
null
null
null
open
PIL Cannot Handle This Data Type === I'm attempting to use the fft module in numpy: import Image, numpy i = Image.open('img.png') a = numpy.asarray(i, numpy.uint8) b = abs(numpy.fft.rfft2(a)) b = numpy.uint8(b) j = Image.fromarray(b) j.save('img2.png') However, when I try and convert the numpy array back to a PIL image, I get the error: TypeError: Cannot handle this data type However, both a and b arrays appear to have the same data type (uint8), and doing `Image.fromarray(a)` runs fine. I do notice the shapes are slightly different (a.shape = (1840, 3264, 3) vs b.shape = (1840, 3264, 2)). I do fix this and find out which data types PIL accepts?
0
308,832
11/21/2008 13:51:35
36,182
11/10/2008 13:40:29
21
8
iphone: the quickest easiest way to detect first launch
What's the quickest, easiest way to check if an application is being launched for the first time?
iphone
null
null
null
null
06/02/2012 22:21:56
not constructive
iphone: the quickest easiest way to detect first launch === What's the quickest, easiest way to check if an application is being launched for the first time?
4
11,599,250
07/22/2012 09:49:39
1,542,324
07/21/2012 07:22:45
1
0
how does the cd command change directory in linux bash script?
i want down load .zip files from ftp URL and use wget command PLEASE Help me .Tanks everyone Matiar
bash
shell
null
null
null
07/22/2012 10:10:00
not a real question
how does the cd command change directory in linux bash script? === i want down load .zip files from ftp URL and use wget command PLEASE Help me .Tanks everyone Matiar
1
7,515,241
09/22/2011 13:08:55
753,603
05/14/2011 12:33:29
1,499
58
Unusual gaps while using JSeperator - Java
I have been working on a Swing GUI and getting some unusual and unwanted gaps after adding `JSeperator`, Any idea how to remove them? Or any other option to how to achieve this nicely! **Visual Description** ![enter image description here][1] Gaps are apparent before `JLabel` "Speed" and after `JSlider`. **Related Code** control.setLayout(new BoxLayout(control, BoxLayout.X_AXIS)); ...another code omitted... control.add(orientation); //JLabel control.add(norm); //JRadioButton control.add(back); //JRadioButton control.add(new JSeparator(SwingConstants.VERTICAL)); control.add(speedLabel); //JLabel control.add(speed); //JSlider control.add(new JSeparator(SwingConstants.VERTICAL)); control.add(turnOutLabel); //JLabel control.add(right); //JRadioButton control.add(straight); //JRadioButton control.add(left); //JRadioButton <hr /> What I want is to Have have everything centred and separated by JSeperator, **Visual Description** ![enter image description here][2] Thank you. [1]: http://i.stack.imgur.com/HcR8F.png [2]: http://i.stack.imgur.com/kPrJG.png
java
swing
gui
awt
layout-manager
null
open
Unusual gaps while using JSeperator - Java === I have been working on a Swing GUI and getting some unusual and unwanted gaps after adding `JSeperator`, Any idea how to remove them? Or any other option to how to achieve this nicely! **Visual Description** ![enter image description here][1] Gaps are apparent before `JLabel` "Speed" and after `JSlider`. **Related Code** control.setLayout(new BoxLayout(control, BoxLayout.X_AXIS)); ...another code omitted... control.add(orientation); //JLabel control.add(norm); //JRadioButton control.add(back); //JRadioButton control.add(new JSeparator(SwingConstants.VERTICAL)); control.add(speedLabel); //JLabel control.add(speed); //JSlider control.add(new JSeparator(SwingConstants.VERTICAL)); control.add(turnOutLabel); //JLabel control.add(right); //JRadioButton control.add(straight); //JRadioButton control.add(left); //JRadioButton <hr /> What I want is to Have have everything centred and separated by JSeperator, **Visual Description** ![enter image description here][2] Thank you. [1]: http://i.stack.imgur.com/HcR8F.png [2]: http://i.stack.imgur.com/kPrJG.png
0
4,453,887
12/15/2010 19:15:14
486,578
10/25/2010 15:03:02
169
2
GO programming language book or tutorial
Is there any good and big pdf tutorial or book for GO programming language ?
go
null
null
null
null
06/02/2012 06:32:22
not constructive
GO programming language book or tutorial === Is there any good and big pdf tutorial or book for GO programming language ?
4
9,429,505
02/24/2012 10:54:37
934,617
09/08/2011 10:45:59
11
0
Session expired before timeout
I set sessiontimeout in web.config file like following. <sessionState timeout="120" cookieless="false" mode="InProc" /> Some times above code working fine.But many times session expired after 10 to 15 minutes automatically. and this errors exists in every browser. when i run same application using .net on my local computer it working fine. **Please note that, i haven't create global.ascx file yet.** Please help me. Thanks in advance..............
c#
asp.net
null
null
null
null
open
Session expired before timeout === I set sessiontimeout in web.config file like following. <sessionState timeout="120" cookieless="false" mode="InProc" /> Some times above code working fine.But many times session expired after 10 to 15 minutes automatically. and this errors exists in every browser. when i run same application using .net on my local computer it working fine. **Please note that, i haven't create global.ascx file yet.** Please help me. Thanks in advance..............
0
6,453,954
06/23/2011 12:26:15
480,537
10/19/2010 13:49:07
1
1
"Application executable is missing a required architecture armv6" on Application loader.
When i run my layarapplication on my device it works, but when i want to upload it with application loader to appstore, it gives a message; "***application executable is missing a required architecture At least one of the following architecture(s) must be present: armv*6**" I've set the "**Build active architect Only**" to "**NO**", the message dissapears but another problem will occurs what i can't fix.. ld: warning: ignoring file /Users/.../Build/Products/Release-iphoneos/liblayarplayer.a, file was built for archive which is not the architecture being linked (armv6) "*_OBJC_CLASS_$_LPAugmentedRealityViewController", referenced from: objc-class-ref in LayarViewController.o ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status*" Anyone id?
application
loader
layer
armv7
armv6
null
open
"Application executable is missing a required architecture armv6" on Application loader. === When i run my layarapplication on my device it works, but when i want to upload it with application loader to appstore, it gives a message; "***application executable is missing a required architecture At least one of the following architecture(s) must be present: armv*6**" I've set the "**Build active architect Only**" to "**NO**", the message dissapears but another problem will occurs what i can't fix.. ld: warning: ignoring file /Users/.../Build/Products/Release-iphoneos/liblayarplayer.a, file was built for archive which is not the architecture being linked (armv6) "*_OBJC_CLASS_$_LPAugmentedRealityViewController", referenced from: objc-class-ref in LayarViewController.o ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status*" Anyone id?
0
6,442,670
06/22/2011 15:43:20
746,336
05/10/2011 07:17:43
349
6
JSF referencing spring-bean, error Target Unreachable, identifier 'x' resolved to null
In a JSF 2 + Spring 3.1 environement, i have a test.xhtml page with: <h:inputText id="nome" value="#{myBean.userName}" /> then i have a WEB-INF/faces.config containing: <el-resolver> org.springframework.web.jsf.el.SpringBeanFacesELResolver </el-resolver> then i have WEB-INF/applicationContext.xml containing: <bean id="myBean" class="com.test.MyBean" scope="session"/> What am i missing? thanks in advance
java
spring
jsf
jsf-2.0
el
null
open
JSF referencing spring-bean, error Target Unreachable, identifier 'x' resolved to null === In a JSF 2 + Spring 3.1 environement, i have a test.xhtml page with: <h:inputText id="nome" value="#{myBean.userName}" /> then i have a WEB-INF/faces.config containing: <el-resolver> org.springframework.web.jsf.el.SpringBeanFacesELResolver </el-resolver> then i have WEB-INF/applicationContext.xml containing: <bean id="myBean" class="com.test.MyBean" scope="session"/> What am i missing? thanks in advance
0
11,656,113
07/25/2012 18:21:10
1,549,922
07/24/2012 21:27:17
1
0
How to use for loop
I have very long excel VBA code below and I am just wondering how to use for loop or anything to make the code shorter and better. What i am trying to do is to copy each column of a workbook and paste them to each different worksheet of a new workbook. For example, column A to sheet1, column B to sheet2 and so on. Thanks. Sub S05_0ab_03() Dim wb As Workbook, wbTemp As Workbook Dim ws As Worksheet, wsTemp As Worksheet Set wb = ThisWorkbook Set ws = wb.Sheets("Sheet1") Set ws2 = wb.Sheets("Sheet2") Set ws3 = wb.Sheets("Sheet3") Set ws4 = wb.Sheets("Sheet4") Set ws5 = wb.Sheets("Sheet5") Set ws6 = wb.Sheets("Sheet6") Set ws7 = wb.Sheets("Sheet7") Set ws8 = wb.Sheets("Sheet8") Set ws9 = wb.Sheets("Sheet9") Set ws10 = wb.Sheets("Sheet10") Set ws11 = wb.Sheets("Sheet11") Set ws12 = wb.Sheets("Sheet12") Set ws13 = wb.Sheets("Sheet13") Set ws14 = wb.Sheets("Sheet14") Set ws15 = wb.Sheets("Sheet15") Set ws16 = wb.Sheets("Sheet16") Set ws17 = wb.Sheets("Sheet17") Set ws18 = wb.Sheets("Sheet18") Set ws19 = wb.Sheets("Sheet19") Set ws20 = wb.Sheets("Sheet20") Set ws21 = wb.Sheets("Sheet21") Set ws22 = wb.Sheets("Sheet22") Set ws23 = wb.Sheets("Sheet23") Set ws24 = wb.Sheets("Sheet24") Set ws25 = wb.Sheets("Sheet25") Set ws26 = wb.Sheets("Sheet26") Set ws27 = wb.Sheets("Sheet27") Set ws28 = wb.Sheets("Sheet28") Set ws29 = wb.Sheets("Sheet29") Set ws30 = wb.Sheets("Sheet30") Set ws31 = wb.Sheets("Sheet31") Set ws32 = wb.Sheets("Sheet32") Set ws33 = wb.Sheets("Sheet33") Set ws34 = wb.Sheets("Sheet34") '~~> Change path as applicable Set wbTemp = Workbooks.Open("C:\Users\cl0106.UNT\Documents\Jill\0ab\S05_0ab_03.xlsx") Set wsTemp = wbTemp.Sheets("Sheet1") 'copy file wsTemp.Range("A3:A102").copy ws.Range("I3:I102") wsTemp.Range("B3:B102").copy ws2.Range("I3:I102") wsTemp.Range("C3:C102").copy ws3.Range("I3:I102") wsTemp.Range("D3:D102").copy ws4.Range("I3:I102") wsTemp.Range("E3:E102").copy ws5.Range("I3:I102") wsTemp.Range("F3:F102").copy ws6.Range("I3:I102") wsTemp.Range("G3:G102").copy ws7.Range("I3:I102") wsTemp.Range("H3:H102").copy ws8.Range("I3:I102") wsTemp.Range("I3:I102").copy ws9.Range("I3:I102") wsTemp.Range("J3:J102").copy ws10.Range("I3:I102") wsTemp.Range("K3:K102").copy ws11.Range("I3:I102") wsTemp.Range("L3:L102").copy ws12.Range("I3:I102") wsTemp.Range("M3:M102").copy ws13.Range("I3:I102") wsTemp.Range("N3:N102").copy ws14.Range("I3:I102") wsTemp.Range("O3:O102").copy ws15.Range("I3:I102") wsTemp.Range("P3:P102").copy ws16.Range("I3:I102") wsTemp.Range("Q3:Q102").copy ws17.Range("I3:I102") wsTemp.Range("R3:R102").copy ws18.Range("I3:I102") wsTemp.Range("S3:S102").copy ws19.Range("I3:I102") wsTemp.Range("T3:T102").copy ws20.Range("I3:I102") wsTemp.Range("U3:U102").copy ws21.Range("I3:I102") wsTemp.Range("V3:V102").copy ws22.Range("I3:I102") wsTemp.Range("W3:W102").copy ws23.Range("I3:I102") wsTemp.Range("X3:X102").copy ws24.Range("I3:I102") wsTemp.Range("Y3:Y102").copy ws25.Range("I3:I102") wsTemp.Range("Z3:Z102").copy ws26.Range("I3:I102") wsTemp.Range("AA3:AA102").copy ws27.Range("I3:I102") wsTemp.Range("AB3:AB102").copy ws28.Range("I3:I102") wsTemp.Range("AC3:AC102").copy ws29.Range("I3:I102") wsTemp.Range("AD3:AD102").copy ws30.Range("I3:I102") wsTemp.Range("AE3:AE102").copy ws31.Range("I3:I102") wsTemp.Range("AF3:AF102").copy ws32.Range("I3:I102") wsTemp.Range("AG3:AG102").copy ws33.Range("I3:I102") wsTemp.Range("AH3:AH102").copy ws34.Range("I3:I102") Application.CutCopyMode = False '~~> Cleanup wbTemp.Close savechanges:=True Set wb = Nothing: Set wbTemp = Nothing Set ws = Nothing: Set ws2 = Nothing: Set wsTemp = Nothing End Sub
for-loop
null
null
null
null
07/26/2012 01:04:47
too localized
How to use for loop === I have very long excel VBA code below and I am just wondering how to use for loop or anything to make the code shorter and better. What i am trying to do is to copy each column of a workbook and paste them to each different worksheet of a new workbook. For example, column A to sheet1, column B to sheet2 and so on. Thanks. Sub S05_0ab_03() Dim wb As Workbook, wbTemp As Workbook Dim ws As Worksheet, wsTemp As Worksheet Set wb = ThisWorkbook Set ws = wb.Sheets("Sheet1") Set ws2 = wb.Sheets("Sheet2") Set ws3 = wb.Sheets("Sheet3") Set ws4 = wb.Sheets("Sheet4") Set ws5 = wb.Sheets("Sheet5") Set ws6 = wb.Sheets("Sheet6") Set ws7 = wb.Sheets("Sheet7") Set ws8 = wb.Sheets("Sheet8") Set ws9 = wb.Sheets("Sheet9") Set ws10 = wb.Sheets("Sheet10") Set ws11 = wb.Sheets("Sheet11") Set ws12 = wb.Sheets("Sheet12") Set ws13 = wb.Sheets("Sheet13") Set ws14 = wb.Sheets("Sheet14") Set ws15 = wb.Sheets("Sheet15") Set ws16 = wb.Sheets("Sheet16") Set ws17 = wb.Sheets("Sheet17") Set ws18 = wb.Sheets("Sheet18") Set ws19 = wb.Sheets("Sheet19") Set ws20 = wb.Sheets("Sheet20") Set ws21 = wb.Sheets("Sheet21") Set ws22 = wb.Sheets("Sheet22") Set ws23 = wb.Sheets("Sheet23") Set ws24 = wb.Sheets("Sheet24") Set ws25 = wb.Sheets("Sheet25") Set ws26 = wb.Sheets("Sheet26") Set ws27 = wb.Sheets("Sheet27") Set ws28 = wb.Sheets("Sheet28") Set ws29 = wb.Sheets("Sheet29") Set ws30 = wb.Sheets("Sheet30") Set ws31 = wb.Sheets("Sheet31") Set ws32 = wb.Sheets("Sheet32") Set ws33 = wb.Sheets("Sheet33") Set ws34 = wb.Sheets("Sheet34") '~~> Change path as applicable Set wbTemp = Workbooks.Open("C:\Users\cl0106.UNT\Documents\Jill\0ab\S05_0ab_03.xlsx") Set wsTemp = wbTemp.Sheets("Sheet1") 'copy file wsTemp.Range("A3:A102").copy ws.Range("I3:I102") wsTemp.Range("B3:B102").copy ws2.Range("I3:I102") wsTemp.Range("C3:C102").copy ws3.Range("I3:I102") wsTemp.Range("D3:D102").copy ws4.Range("I3:I102") wsTemp.Range("E3:E102").copy ws5.Range("I3:I102") wsTemp.Range("F3:F102").copy ws6.Range("I3:I102") wsTemp.Range("G3:G102").copy ws7.Range("I3:I102") wsTemp.Range("H3:H102").copy ws8.Range("I3:I102") wsTemp.Range("I3:I102").copy ws9.Range("I3:I102") wsTemp.Range("J3:J102").copy ws10.Range("I3:I102") wsTemp.Range("K3:K102").copy ws11.Range("I3:I102") wsTemp.Range("L3:L102").copy ws12.Range("I3:I102") wsTemp.Range("M3:M102").copy ws13.Range("I3:I102") wsTemp.Range("N3:N102").copy ws14.Range("I3:I102") wsTemp.Range("O3:O102").copy ws15.Range("I3:I102") wsTemp.Range("P3:P102").copy ws16.Range("I3:I102") wsTemp.Range("Q3:Q102").copy ws17.Range("I3:I102") wsTemp.Range("R3:R102").copy ws18.Range("I3:I102") wsTemp.Range("S3:S102").copy ws19.Range("I3:I102") wsTemp.Range("T3:T102").copy ws20.Range("I3:I102") wsTemp.Range("U3:U102").copy ws21.Range("I3:I102") wsTemp.Range("V3:V102").copy ws22.Range("I3:I102") wsTemp.Range("W3:W102").copy ws23.Range("I3:I102") wsTemp.Range("X3:X102").copy ws24.Range("I3:I102") wsTemp.Range("Y3:Y102").copy ws25.Range("I3:I102") wsTemp.Range("Z3:Z102").copy ws26.Range("I3:I102") wsTemp.Range("AA3:AA102").copy ws27.Range("I3:I102") wsTemp.Range("AB3:AB102").copy ws28.Range("I3:I102") wsTemp.Range("AC3:AC102").copy ws29.Range("I3:I102") wsTemp.Range("AD3:AD102").copy ws30.Range("I3:I102") wsTemp.Range("AE3:AE102").copy ws31.Range("I3:I102") wsTemp.Range("AF3:AF102").copy ws32.Range("I3:I102") wsTemp.Range("AG3:AG102").copy ws33.Range("I3:I102") wsTemp.Range("AH3:AH102").copy ws34.Range("I3:I102") Application.CutCopyMode = False '~~> Cleanup wbTemp.Close savechanges:=True Set wb = Nothing: Set wbTemp = Nothing Set ws = Nothing: Set ws2 = Nothing: Set wsTemp = Nothing End Sub
3
986,681
06/12/2009 13:38:34
39,278
11/20/2008 11:15:31
474
68
Optimal Screen Resolution to capture screen cast for a demo
I am making a screen cast nor capture of the functionality of our application.I am doing it on my laptop,I am supposed to connect a projector or a tv to show the demo.What would be the optimal screen resolution? Or is there something like that? What is the resolution you choose.Sometime the projector or tv doesnt support some resolutions so the demo.exe you make at high resolution ends up clipped or too big so you are screwed? I am using adobe captivate to make the exe of the demo screen cast.
screencast
resolution
demo
null
null
null
open
Optimal Screen Resolution to capture screen cast for a demo === I am making a screen cast nor capture of the functionality of our application.I am doing it on my laptop,I am supposed to connect a projector or a tv to show the demo.What would be the optimal screen resolution? Or is there something like that? What is the resolution you choose.Sometime the projector or tv doesnt support some resolutions so the demo.exe you make at high resolution ends up clipped or too big so you are screwed? I am using adobe captivate to make the exe of the demo screen cast.
0
478,247
01/25/2009 20:48:05
53,740
01/10/2009 18:52:56
36
1
Blacklists, Whitelists, Spam Folders and Email
I want to get on the whitelists for my email system, any recommendations whom to should contact about doing this, do I contact the big email providers directly (Yahoo, gmail, Microsoft hotmail/msn, AOL)? Also besides domainkeys, dkim and SPF records what else is a good way to protect yourself from getting on blacklists and going into spam folders? Also is there a good list out on the net of things not to say in emails when sending, like saying the word "FREE FREE FREE" three times in an email isn't good.
email-spam
spam-prevention
spam-blocking
whitelist
blacklist
01/25/2009 21:13:41
off topic
Blacklists, Whitelists, Spam Folders and Email === I want to get on the whitelists for my email system, any recommendations whom to should contact about doing this, do I contact the big email providers directly (Yahoo, gmail, Microsoft hotmail/msn, AOL)? Also besides domainkeys, dkim and SPF records what else is a good way to protect yourself from getting on blacklists and going into spam folders? Also is there a good list out on the net of things not to say in emails when sending, like saying the word "FREE FREE FREE" three times in an email isn't good.
2
10,725,950
05/23/2012 18:41:39
849,137
07/17/2011 23:08:19
937
29
What kind of task should I expect In a PHP job interview?
I've got a job interview a week from today. The job is based in PHP web development. I have 3 years experience with PHP and a few other languages, but I'm only 17 so this is my first computer/programming related interview I've ever had. The employer did mention on the phone that I will be asked to write some code in the interview. I've had a look around and came across the famous **FizzBuzz** question, which I found quite easy to do. I'm really nervous about this interview and don't want to mess it up. Can anyone give me some example questions that you would ask a PHP programmer, in an interview. Or even better, if you've been in the same situation, what kind of task(s) were you set?
php
interview-questions
null
null
null
05/23/2012 18:54:59
off topic
What kind of task should I expect In a PHP job interview? === I've got a job interview a week from today. The job is based in PHP web development. I have 3 years experience with PHP and a few other languages, but I'm only 17 so this is my first computer/programming related interview I've ever had. The employer did mention on the phone that I will be asked to write some code in the interview. I've had a look around and came across the famous **FizzBuzz** question, which I found quite easy to do. I'm really nervous about this interview and don't want to mess it up. Can anyone give me some example questions that you would ask a PHP programmer, in an interview. Or even better, if you've been in the same situation, what kind of task(s) were you set?
2
7,179,957
08/24/2011 17:49:40
818,694
06/28/2011 07:12:02
3
0
Android : Custom View onCLickListener
i have created an Custom View that should changes his appearence on Click. The onClickListener and the OnTouchEventListener get called correctly and the appreance changed in the View. But as soon as i set another onClickListener at the Activity to interact with other Methodes, only the OnClickListener from the Activity gets called and the one inside the View got ignored. Is there any possibility to inherited the onClickListener from the View to the Activity so that both (Visualchange and call of a Method) OnClick's get called ? Ive also tried to implement the View with Drawables and a StateListDrawable, but also without any luck since "state_pressed" wont get called. Any ideas ? Thanks in advance !
android
null
null
null
null
null
open
Android : Custom View onCLickListener === i have created an Custom View that should changes his appearence on Click. The onClickListener and the OnTouchEventListener get called correctly and the appreance changed in the View. But as soon as i set another onClickListener at the Activity to interact with other Methodes, only the OnClickListener from the Activity gets called and the one inside the View got ignored. Is there any possibility to inherited the onClickListener from the View to the Activity so that both (Visualchange and call of a Method) OnClick's get called ? Ive also tried to implement the View with Drawables and a StateListDrawable, but also without any luck since "state_pressed" wont get called. Any ideas ? Thanks in advance !
0
10,965,156
06/09/2012 22:51:11
801,468
06/16/2011 12:44:54
3
0
Parallel Scientific Computation Software Development Language?
I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy computations in parallel, with many LU factorizations and the use of sparse linear solvers. The candidate solutions I was thinking are Fortran 2003/2008 with OpenMP or co-array, C++ with openmp cilk+ or TBB, python. Any other, documented, suggestions are welcome! I know very well C, Fortran and Java (in that order). I've done some scripting in python but basic stuff. The software needs to be able to handle big amounts of data and be effective with scientific computations. The performance is of the essence. For the background, I already have a working software written in Fortran. Many people were involved in development over many years and the code is really dirty. Maintaining and parallelizing the code has proved a nightmare and I'm thinking of alternatives. Thanks for your time, Petros
c++
python
fortran
scientific-computing
scientific-software
06/09/2012 22:56:38
not constructive
Parallel Scientific Computation Software Development Language? === I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy computations in parallel, with many LU factorizations and the use of sparse linear solvers. The candidate solutions I was thinking are Fortran 2003/2008 with OpenMP or co-array, C++ with openmp cilk+ or TBB, python. Any other, documented, suggestions are welcome! I know very well C, Fortran and Java (in that order). I've done some scripting in python but basic stuff. The software needs to be able to handle big amounts of data and be effective with scientific computations. The performance is of the essence. For the background, I already have a working software written in Fortran. Many people were involved in development over many years and the code is really dirty. Maintaining and parallelizing the code has proved a nightmare and I'm thinking of alternatives. Thanks for your time, Petros
4
7,655,042
10/04/2011 23:06:10
972,202
09/30/2011 00:26:57
15
0
Best Python Module for HTML parsing
I have a website updater(people can update content(text) not the look of the website) which has HTML, javascript as the front end languages & python as the back-end/server side. I am finding that updating HTML is very difficult from the front end because when I grab the updated HTML by **ele.innerHTML** or **$(ele).html()** gives altered HTML depending on the browser(DAMN IE). **So I have decided to update my HTML from the backend, ie, in Python** What do you think is the best python module to parse HTML & grab information? My requirements are: - that the module be atleast in Python 2.5 or up(because of my webhost) - I will be parsing HTML & finding all the HTML elements that are of the class "updatable" - For each element of the class "updatable": extract the innerText(not html only text/content) **Which python module would you suggest is best for this?** - HTMLParser.py - htmllib.py - know of any other python 2.5 compatible modules?
python
html
html-parsing
null
null
10/05/2011 01:05:56
not constructive
Best Python Module for HTML parsing === I have a website updater(people can update content(text) not the look of the website) which has HTML, javascript as the front end languages & python as the back-end/server side. I am finding that updating HTML is very difficult from the front end because when I grab the updated HTML by **ele.innerHTML** or **$(ele).html()** gives altered HTML depending on the browser(DAMN IE). **So I have decided to update my HTML from the backend, ie, in Python** What do you think is the best python module to parse HTML & grab information? My requirements are: - that the module be atleast in Python 2.5 or up(because of my webhost) - I will be parsing HTML & finding all the HTML elements that are of the class "updatable" - For each element of the class "updatable": extract the innerText(not html only text/content) **Which python module would you suggest is best for this?** - HTMLParser.py - htmllib.py - know of any other python 2.5 compatible modules?
4
4,487,849
12/20/2010 08:05:37
227,943
12/09/2009 12:15:28
492
26
Make webview fill_parent stay above the bottom image in Android
I have following things layed out in my xml file: 1. Webview 2. Bottom image/ Admob Since I wanted my Admob to be displayed at the bottom, I chose two different layouts LinearLayout for Admob as suggested and RelativeLayout for other views. Also, since I'm displaying splashscreen first and then webview, my logic goes such that I want both of them in a framelayout. My bottom image and Admob lay one above the other. So, my code goes as: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:myapp="http://schemas.android.com/apk/res/app.news" android:layout_width="wrap_content" android:layout_height="fill_parent"> <FrameLayout android:id="@+id/views" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ImageView android:id="@+id/splash_screen" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="center" android:src="@drawable/splash_screen" android:visibility="visible" /> <WebView android:id="@+id/webvw" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="fill_vertical" android:scrollbars="none" android:visibility="invisible" /> <ImageView android:id="@+id/bottomImage" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="fitEnd" android:src="@drawable/logo" android:visibility="visible" /> </FrameLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:gravity="bottom" android:layout_alignBottom="@id/views" > <com.admob.android.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" myapp:testing="false" /> </LinearLayout> </RelativeLayout> I want webview to occupy all the space except for the bottom image, I'm not sure how to make it happen using webview height to be "fill_parent". Can anybody please help? Thanx in advance.
android
layout
null
null
null
null
open
Make webview fill_parent stay above the bottom image in Android === I have following things layed out in my xml file: 1. Webview 2. Bottom image/ Admob Since I wanted my Admob to be displayed at the bottom, I chose two different layouts LinearLayout for Admob as suggested and RelativeLayout for other views. Also, since I'm displaying splashscreen first and then webview, my logic goes such that I want both of them in a framelayout. My bottom image and Admob lay one above the other. So, my code goes as: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:myapp="http://schemas.android.com/apk/res/app.news" android:layout_width="wrap_content" android:layout_height="fill_parent"> <FrameLayout android:id="@+id/views" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ImageView android:id="@+id/splash_screen" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="center" android:src="@drawable/splash_screen" android:visibility="visible" /> <WebView android:id="@+id/webvw" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="fill_vertical" android:scrollbars="none" android:visibility="invisible" /> <ImageView android:id="@+id/bottomImage" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="fitEnd" android:src="@drawable/logo" android:visibility="visible" /> </FrameLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:gravity="bottom" android:layout_alignBottom="@id/views" > <com.admob.android.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" myapp:testing="false" /> </LinearLayout> </RelativeLayout> I want webview to occupy all the space except for the bottom image, I'm not sure how to make it happen using webview height to be "fill_parent". Can anybody please help? Thanx in advance.
0
8,214,929
11/21/2011 16:20:31
1,007,437
10/21/2011 15:39:13
4
0
compiler error in c program about fork function
#include<sys/types.h> #include<stdio.h> #include<unistd.h> main() { int pid; pid=fork(); if (pid==0) { printf("i am child"); printf("\nI am the parent %d", getpid()); printf("\ni am the child %d",getppid()); } else { printf("\n i am the parent"); printf("\n I am the parent's parent %d", getppid()); } /*prog.c: In function ‘main’: prog.c:19:1: error: expected declaration or statement at end of input*/
vim
gcc
compiler-errors
null
null
11/21/2011 17:03:31
not a real question
compiler error in c program about fork function === #include<sys/types.h> #include<stdio.h> #include<unistd.h> main() { int pid; pid=fork(); if (pid==0) { printf("i am child"); printf("\nI am the parent %d", getpid()); printf("\ni am the child %d",getppid()); } else { printf("\n i am the parent"); printf("\n I am the parent's parent %d", getppid()); } /*prog.c: In function ‘main’: prog.c:19:1: error: expected declaration or statement at end of input*/
1
7,307,770
09/05/2011 12:02:14
739,982
05/05/2011 12:57:33
8
0
mysql_fetch_array - how to use $result?
so im using a while statement on this and i can echo each row fine i.e echo $row['myrow']; but what i want is to have the result put into a link like so: echo "<img src='http://www.mysite.com/images/$row['myrow'].jpg'>"; but this does not work? Thanks.
php
mysql
arrays
fetch
null
null
open
mysql_fetch_array - how to use $result? === so im using a while statement on this and i can echo each row fine i.e echo $row['myrow']; but what i want is to have the result put into a link like so: echo "<img src='http://www.mysite.com/images/$row['myrow'].jpg'>"; but this does not work? Thanks.
0
3,331,110
07/25/2010 21:36:55
466,534
04/21/2010 12:03:08
954
5
c run time model
see code from programming pearls http://www.cs.bell-labs.com/cm/cs/pearls/timemod.c and also my effort to do myself #include <stdio.h> #include <time.h> #include <stdlib.h> #include <math.h> #define maxn 100000 int x[maxn]; int startn=5000; int n; //function to be timed int intcmp(int *i,int *j) { return *i-*j;} #define swapmac(i,j) {t=x[i];x[i]=x[j];x[j]=t;} void swapfunc(int i,int j){ int t=x[i]; x[i]=x[j]; x[j]=t; } #define maxmac(a,b) ((a)>(b)?(a):(b)); int maxfunc(int a,int b){ return a>b?a:b; } #define T(s) printf("%s (n=%d)\n",s,n); #define trials 5 #define M(op) \ printf(" %-22s",&op); \ k=0; \ timesum=0; \ for (ex=0;ex<trials;ex++) { \ start=clock(); \ for (i=1;i<=n;i++) { \ fi=(float) i; \ for (j=1;j<=n;j++) { \ op; \ } \ } \ t=clock()-start; \ printf("%6d",t); \ timesum+=t; \ } \ nans=1e9 * timesum/ ((double)\ n*n*trials*CLOCKS_PER_SEC);\ printf("8.0f\n".nans); int main(){ int i,j,k; float fi,fj,fk; int t,ex,timesum,start,globalstart; double nans; globalstart=clock(); for (int i=0;i<n;i++) x[i]=rand(); n=startn; printf(" C Time Cost Model,n=%d\n",n); T("Integer Arithmetic"); M({}); M(k++); M(k = i + j); M(k = i - j); M(k = i * j); M(k = i / j); M(k = i % j); M(k = i & j); M(k = i | j); T("Floating Point Arithmetic"); M(fj=j;); M(fj=j; fk = fi + fj;); M(fj=j; fk = fi - fj;); M(fj=j; fk = fi * fj;); M(fj=j; fk = fi / fj;); T("Array Operations"); M(k = i + j); M(k = x[i] + j); M(k = i + x[j]); M(k = x[i] + x[j]); T("Comparisons"); M(if (i < j) k++); M(if (x[i] < x[j]) k++); T("Array Comparisons and Swaps"); M(k = (x[i]<x[k]) ? -1:1); M(k = intcmp(x+i, x+j)); M(swapmac(i, j)); M(swapfunc(i, j)); T("Max Function, Macro and Inline"); M(k = (i > j) ? i : j); M(k = maxmac(i, j)); M(k = maxfunc(i, j)); n = startn / 5; T("Math Functions"); M(fk = j+fi;); M(k = rand();); M(fk = sqrt(j+fi)); M(fk = sin(j+fi)); M(fk = sinh(j+fi)); M(fk = asin(j+fi)); M(fk = cos(j+fi)); M(fk = tan(j+fi)); n = startn / 10; T("Memory Allocation"); M(free(malloc(16));); M(free(malloc(100));); M(free(malloc(2000));); /* Possible additions: input, output, malloc */ printf(" Secs: %4.2f\n", ((double) clock()-globalstart) / CLOCKS_PER_SEC); return 0; } list of mistakes 1 >------ Build started: Project: run_time, Configuration: Debug Win32 ------ 1> run.cpp 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2143: syntax error : missing ')' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2143: syntax error : missing ';' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(57): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(57): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(58): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(58): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(59): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(59): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(60): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(60): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(61): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(61): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(62): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(62): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(63): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(63): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(64): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(64): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(72): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(72): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(73): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(73): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(74): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(74): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(75): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(75): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(77): error C2059: syntax error : 'if' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(77): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(78): error C2059: syntax error : 'if' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(78): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(80): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(80): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(81): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(81): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2143: syntax error : missing ')' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2143: syntax error : missing ';' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(83): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(83): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(85): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(85): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(87): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(87): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(92): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(92): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(93): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(93): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(94): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(94): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(95): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(95): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(96): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(96): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(97): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(97): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(102): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(102): fatal error C1003: error count exceeds 100; stopping compilation ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
c
null
null
null
null
07/25/2010 21:45:38
not a real question
c run time model === see code from programming pearls http://www.cs.bell-labs.com/cm/cs/pearls/timemod.c and also my effort to do myself #include <stdio.h> #include <time.h> #include <stdlib.h> #include <math.h> #define maxn 100000 int x[maxn]; int startn=5000; int n; //function to be timed int intcmp(int *i,int *j) { return *i-*j;} #define swapmac(i,j) {t=x[i];x[i]=x[j];x[j]=t;} void swapfunc(int i,int j){ int t=x[i]; x[i]=x[j]; x[j]=t; } #define maxmac(a,b) ((a)>(b)?(a):(b)); int maxfunc(int a,int b){ return a>b?a:b; } #define T(s) printf("%s (n=%d)\n",s,n); #define trials 5 #define M(op) \ printf(" %-22s",&op); \ k=0; \ timesum=0; \ for (ex=0;ex<trials;ex++) { \ start=clock(); \ for (i=1;i<=n;i++) { \ fi=(float) i; \ for (j=1;j<=n;j++) { \ op; \ } \ } \ t=clock()-start; \ printf("%6d",t); \ timesum+=t; \ } \ nans=1e9 * timesum/ ((double)\ n*n*trials*CLOCKS_PER_SEC);\ printf("8.0f\n".nans); int main(){ int i,j,k; float fi,fj,fk; int t,ex,timesum,start,globalstart; double nans; globalstart=clock(); for (int i=0;i<n;i++) x[i]=rand(); n=startn; printf(" C Time Cost Model,n=%d\n",n); T("Integer Arithmetic"); M({}); M(k++); M(k = i + j); M(k = i - j); M(k = i * j); M(k = i / j); M(k = i % j); M(k = i & j); M(k = i | j); T("Floating Point Arithmetic"); M(fj=j;); M(fj=j; fk = fi + fj;); M(fj=j; fk = fi - fj;); M(fj=j; fk = fi * fj;); M(fj=j; fk = fi / fj;); T("Array Operations"); M(k = i + j); M(k = x[i] + j); M(k = i + x[j]); M(k = x[i] + x[j]); T("Comparisons"); M(if (i < j) k++); M(if (x[i] < x[j]) k++); T("Array Comparisons and Swaps"); M(k = (x[i]<x[k]) ? -1:1); M(k = intcmp(x+i, x+j)); M(swapmac(i, j)); M(swapfunc(i, j)); T("Max Function, Macro and Inline"); M(k = (i > j) ? i : j); M(k = maxmac(i, j)); M(k = maxfunc(i, j)); n = startn / 5; T("Math Functions"); M(fk = j+fi;); M(k = rand();); M(fk = sqrt(j+fi)); M(fk = sin(j+fi)); M(fk = sinh(j+fi)); M(fk = asin(j+fi)); M(fk = cos(j+fi)); M(fk = tan(j+fi)); n = startn / 10; T("Memory Allocation"); M(free(malloc(16));); M(free(malloc(100));); M(free(malloc(2000));); /* Possible additions: input, output, malloc */ printf(" Secs: %4.2f\n", ((double) clock()-globalstart) / CLOCKS_PER_SEC); return 0; } list of mistakes 1 >------ Build started: Project: run_time, Configuration: Debug Win32 ------ 1> run.cpp 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2143: syntax error : missing ')' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2143: syntax error : missing ';' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(56): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(57): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(57): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(58): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(58): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(59): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(59): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(60): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(60): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(61): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(61): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(62): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(62): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(63): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(63): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(64): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(64): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(66): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(67): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(68): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(69): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2440: '=' : cannot convert from 'int' to 'float *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(70): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(72): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(72): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(73): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(73): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(74): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(74): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(75): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(75): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(77): error C2059: syntax error : 'if' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(77): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(78): error C2059: syntax error : 'if' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(78): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(80): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(80): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(81): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(81): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2143: syntax error : missing ')' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2143: syntax error : missing ';' before '{' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(82): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(83): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(83): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(85): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(85): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(86): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(87): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(87): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(90): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2440: '=' : cannot convert from 'int' to 'int *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(91): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(92): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(92): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(93): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(93): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(94): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(94): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(95): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(95): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(96): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(96): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(97): error C2440: '=' : cannot convert from 'float' to 'float *' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(97): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(100): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2143: syntax error : missing ')' before ';' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2059: syntax error : ')' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(101): error C2228: left of '.nans' must have class/struct/union 1> type is 'const char [6]' 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(102): error C2102: '&' requires l-value 1>c:\users\david\documents\visual studio 2010\projects\run_time\run.cpp(102): fatal error C1003: error count exceeds 100; stopping compilation ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1
11,006,053
06/12/2012 22:59:00
1,431,633
06/01/2012 21:13:40
8
0
jQuery/AJAX read html inside div tag
I'm getting HTML from a database via AJAX but when I output that HTML into a div, it only shows the actual HTML text, not the pictures and such as a browser sees it. Anyone know how to do this? I'm outputting the HTML in textarea #html and want to see it rendered in div #preview. Here's the code: $(document).ready(function(){ $('#creative').change(function() { $.ajax({ url: '/app/components/MailingsReport.cfc', //POST method is used type: "POST", //pass the data data: { method: "getCreativeHTML", creativeID: $('#creative').val(), datasource: "shopping_cart" }, dataType: "html", //contentType: "application/text; charset=utf-8", success: function(response){ var obj = $.trim(response); //alert("response"); if (obj == '"0 records"') { $('#preview').html("No creative found."); } else { $('#html').val( obj ); $('#preview').html( obj ); } } }) }); });
jquery
html
ajax
div
null
null
open
jQuery/AJAX read html inside div tag === I'm getting HTML from a database via AJAX but when I output that HTML into a div, it only shows the actual HTML text, not the pictures and such as a browser sees it. Anyone know how to do this? I'm outputting the HTML in textarea #html and want to see it rendered in div #preview. Here's the code: $(document).ready(function(){ $('#creative').change(function() { $.ajax({ url: '/app/components/MailingsReport.cfc', //POST method is used type: "POST", //pass the data data: { method: "getCreativeHTML", creativeID: $('#creative').val(), datasource: "shopping_cart" }, dataType: "html", //contentType: "application/text; charset=utf-8", success: function(response){ var obj = $.trim(response); //alert("response"); if (obj == '"0 records"') { $('#preview').html("No creative found."); } else { $('#html').val( obj ); $('#preview').html( obj ); } } }) }); });
0
8,769,680
01/07/2012 12:26:33
1,135,882
01/07/2012 11:28:01
1
0
Mysql retrieve only specific values from n:n relation
Say we have following Mysql tables: *user table: userID | user_name* *classification table: classificationID | classification_name | classification_ponder* *user_classification table: userId(PK) | classificationId(PK)* This is n:n relationship between user and classifiaction. I am interested how to query for every user, ALL classifications with biggest ponder in one column, separated with `,`? E.g. let say we have user1 with ID=1 and following classifications: *classification1: 1, class1, 5 | classification2: 2, class2, 5 | classification3: 3, class3, 4 | classification4: 4, class4, 2.* user_classification table is: (1, 1), (1, 2), (1, 3), (1, 4) (user have all classifications). What i want to get is: *userId | user_name | class1, class2* So only classification names with biggest ponder (in this case class1 and class2) displayed in one column, separated with ",". I succeed to get all classifications for user with following mysql query: <b>select user.user_name, GROUP_CONCAT(DISTINCT Classification.classification_name) as Classification from user left join user_classification on (user_classification.userId=user.userID) left join Classification on (Classification.classificationID=user_classification.classificationId) GROUP BY user.userID</b> <b>What i want is do display only classifications with biggest ponder.</b> Best regards.
mysql
null
null
null
null
null
open
Mysql retrieve only specific values from n:n relation === Say we have following Mysql tables: *user table: userID | user_name* *classification table: classificationID | classification_name | classification_ponder* *user_classification table: userId(PK) | classificationId(PK)* This is n:n relationship between user and classifiaction. I am interested how to query for every user, ALL classifications with biggest ponder in one column, separated with `,`? E.g. let say we have user1 with ID=1 and following classifications: *classification1: 1, class1, 5 | classification2: 2, class2, 5 | classification3: 3, class3, 4 | classification4: 4, class4, 2.* user_classification table is: (1, 1), (1, 2), (1, 3), (1, 4) (user have all classifications). What i want to get is: *userId | user_name | class1, class2* So only classification names with biggest ponder (in this case class1 and class2) displayed in one column, separated with ",". I succeed to get all classifications for user with following mysql query: <b>select user.user_name, GROUP_CONCAT(DISTINCT Classification.classification_name) as Classification from user left join user_classification on (user_classification.userId=user.userID) left join Classification on (Classification.classificationID=user_classification.classificationId) GROUP BY user.userID</b> <b>What i want is do display only classifications with biggest ponder.</b> Best regards.
0
10,042
08/13/2008 16:29:22
571
08/06/2008 20:19:59
533
43
How do I implement a Linked List in Java?
So I got this as a homework question, and I was wondering if you pros could do it for me. KTHXBYE!
homework
java
linkedlist
null
null
01/03/2012 20:21:00
not constructive
How do I implement a Linked List in Java? === So I got this as a homework question, and I was wondering if you pros could do it for me. KTHXBYE!
4
8,131,695
11/15/2011 04:59:56
708,502
04/14/2011 18:11:14
38
3
How to count repeated records in sql?
Hi have a table name is Pattern S.No type Id_Section 1 A IPS 2 A IPS 3 A IPS 4 A IPS 1 B IPS 2 B IPS 3 B IPS 1 C IPS 2 C IPS I want a query to count records where type "A" ...I tried some examples..But i am getting whole records count..Please any one help me..
sql
null
null
null
null
null
open
How to count repeated records in sql? === Hi have a table name is Pattern S.No type Id_Section 1 A IPS 2 A IPS 3 A IPS 4 A IPS 1 B IPS 2 B IPS 3 B IPS 1 C IPS 2 C IPS I want a query to count records where type "A" ...I tried some examples..But i am getting whole records count..Please any one help me..
0
9,884,548
03/27/2012 06:43:36
718,327
04/21/2011 05:18:24
10
0
error expected primary-expression before 'char'
i have a question, i am trying this if (strncmp(m_DSServer, "TCP:", 4) != 0 ) return DS_AS_PROCESS_NAME_INCORRECT; if if(strchr(char *(m_DSServer[4]),':')== NULL) here it is giving me primary-expression before 'char return DS_AS_PROCESS_NAME_INCORRECT; else if(strchr(m_DSServer[4],'/')== NULL) return DS_AS_PROCESS_NAME_INCORRECT;
c++
c
compiler
null
null
03/27/2012 14:54:03
too localized
error expected primary-expression before 'char' === i have a question, i am trying this if (strncmp(m_DSServer, "TCP:", 4) != 0 ) return DS_AS_PROCESS_NAME_INCORRECT; if if(strchr(char *(m_DSServer[4]),':')== NULL) here it is giving me primary-expression before 'char return DS_AS_PROCESS_NAME_INCORRECT; else if(strchr(m_DSServer[4],'/')== NULL) return DS_AS_PROCESS_NAME_INCORRECT;
3
10,618,989
05/16/2012 12:52:59
1,271,612
03/15/2012 13:14:30
16
0
Google+ mobile app
I was going through an article mentioning about linkedin app for mobile devices. It was mentioned there that linkedin app is 95% html5 + node.js and 5% native. Today I installed Google+ app on my iPod Touch. The feel was very similar to the linkedin app. I was just wondering what back end technologies are into force behind google+ app for mobile devices?
linkedin
google-plus
null
null
null
05/18/2012 17:26:01
not constructive
Google+ mobile app === I was going through an article mentioning about linkedin app for mobile devices. It was mentioned there that linkedin app is 95% html5 + node.js and 5% native. Today I installed Google+ app on my iPod Touch. The feel was very similar to the linkedin app. I was just wondering what back end technologies are into force behind google+ app for mobile devices?
4
4,457,677
12/16/2010 05:22:41
544,297
12/16/2010 05:16:28
1
0
Hoe to create OCR on android
I need the OCR which can give me the all character from the image, i have already try the Aspire and Tesserect api on java with linux but both the are not given the accurate result as i want . so is there any other api are avilable to solve my problem Thank in Advance Ritesh
java
android
null
null
null
07/19/2012 19:25:19
not constructive
Hoe to create OCR on android === I need the OCR which can give me the all character from the image, i have already try the Aspire and Tesserect api on java with linux but both the are not given the accurate result as i want . so is there any other api are avilable to solve my problem Thank in Advance Ritesh
4
11,354,457
07/06/2012 00:42:18
337,546
05/10/2010 18:01:42
663
11
Permission API: Storing access token and token secret for a later use
I am using Permissions API to retrieve access token and token secret in order to create "X-PAYPAL-AUTHORIZATION" to process the Refund operation. In order to create the header, I am using PayPal SDK (OAuthSignature.getFullAuthString). Should I be persisting access token and token secret and create header each time I make an API call? Or is the header (String retuned by getFullAuthString) reusable forever? Thanks
paypal
paypal-api
null
null
null
null
open
Permission API: Storing access token and token secret for a later use === I am using Permissions API to retrieve access token and token secret in order to create "X-PAYPAL-AUTHORIZATION" to process the Refund operation. In order to create the header, I am using PayPal SDK (OAuthSignature.getFullAuthString). Should I be persisting access token and token secret and create header each time I make an API call? Or is the header (String retuned by getFullAuthString) reusable forever? Thanks
0
4,937,659
02/08/2011 19:53:34
563,063
01/04/2011 20:05:05
7
0
I want to know if its possible to get someones ip address, if I have his name, email and ID.
I want to know if its possible to get someones ip address, if I have his name, email and ID.
ip
address
null
null
null
01/12/2012 12:08:12
off topic
I want to know if its possible to get someones ip address, if I have his name, email and ID. === I want to know if its possible to get someones ip address, if I have his name, email and ID.
2
7,506,462
09/21/2011 20:50:29
957,835
09/21/2011 20:50:29
1
0
Multiple tabs within the tab
So I found an application that allowed me to create multiple tabs - Multiple tab builder. But with this app I can't add an image-header above the tabs. So I tried in my own app, where you could put the image header above the menu tabs, but unfortunately the tab's links weren't working(I found codes of one menu tabs on the web - http://www.kalsey.com/tools/csstabs/). So I need to get the menu tab coded manually. Does anyone know how? Would really appreciate it! Thanks
html
css
facebook
null
null
09/22/2011 06:03:53
not a real question
Multiple tabs within the tab === So I found an application that allowed me to create multiple tabs - Multiple tab builder. But with this app I can't add an image-header above the tabs. So I tried in my own app, where you could put the image header above the menu tabs, but unfortunately the tab's links weren't working(I found codes of one menu tabs on the web - http://www.kalsey.com/tools/csstabs/). So I need to get the menu tab coded manually. Does anyone know how? Would really appreciate it! Thanks
1
7,415,602
09/14/2011 11:29:51
859,154
07/23/2011 09:23:42
422
8
what is the difference between those uri's?
What is the **difference** between each of those urls ? **When** will i use each ? http://localhost/x http://localhost:80/x http://myComputerName/x http://127.0.0.1/x
http
url
null
null
null
09/14/2011 11:52:21
not a real question
what is the difference between those uri's? === What is the **difference** between each of those urls ? **When** will i use each ? http://localhost/x http://localhost:80/x http://myComputerName/x http://127.0.0.1/x
1
7,393,737
09/12/2011 20:39:34
394,245
07/16/2010 19:25:07
6
0
Error Processing Jtemplate
Its possible to process this jtemplate? I have a object with two tables, then a need processa a template inside other. Any sugestions? {#template MAIN} <table> {#foreach $T.result.Mensagem as Message} {#include ROW0 root=$T.Message} {#/for} </table> {#/template MAIN} {#template ROW0} <tr> <td> <table border="0" cellpadding="5" cellspacing="0" > <tr> <th style="width:20px;" >Bit</th> <th style="width:100px;" >Esperado</th> <th style="width:100px;" >Recebido</th> <th style="width:100px;" >Erro</th> </tr> {#foreach $T.Recebida as Received} {#include ROW1 root=$T.Received} {#/for} </table> </td> <td> <table border="0" cellpadding="5" cellspacing="0" > <tr> <th style="width:20px;">Bit</th> <th style="width:100px;">Enviado</th> </tr> {#foreach $T.Enviada as Sent} {#include ROW2 root=$T.Sent} {#/for} </table> </td> </tr> {#/template ROW0} {#template ROW1} <tr class="{#cycle values=['evenRow','evenRow']}"> <td>{$T.id}</td> <td>{$T.esperado}</td> <td>{$T.recebido}</td> <td>{$T.erro}</td> </tr> {#/template ROW1} {#template ROW2} <tr class="{#cycle values=['evenRow','evenRow']}"> <td>{$T.id}</td> <td>{$T.enviado}</td> </tr> {#/template ROW2}
javascript
jquery
jtemplate
null
null
10/03/2011 15:26:49
too localized
Error Processing Jtemplate === Its possible to process this jtemplate? I have a object with two tables, then a need processa a template inside other. Any sugestions? {#template MAIN} <table> {#foreach $T.result.Mensagem as Message} {#include ROW0 root=$T.Message} {#/for} </table> {#/template MAIN} {#template ROW0} <tr> <td> <table border="0" cellpadding="5" cellspacing="0" > <tr> <th style="width:20px;" >Bit</th> <th style="width:100px;" >Esperado</th> <th style="width:100px;" >Recebido</th> <th style="width:100px;" >Erro</th> </tr> {#foreach $T.Recebida as Received} {#include ROW1 root=$T.Received} {#/for} </table> </td> <td> <table border="0" cellpadding="5" cellspacing="0" > <tr> <th style="width:20px;">Bit</th> <th style="width:100px;">Enviado</th> </tr> {#foreach $T.Enviada as Sent} {#include ROW2 root=$T.Sent} {#/for} </table> </td> </tr> {#/template ROW0} {#template ROW1} <tr class="{#cycle values=['evenRow','evenRow']}"> <td>{$T.id}</td> <td>{$T.esperado}</td> <td>{$T.recebido}</td> <td>{$T.erro}</td> </tr> {#/template ROW1} {#template ROW2} <tr class="{#cycle values=['evenRow','evenRow']}"> <td>{$T.id}</td> <td>{$T.enviado}</td> </tr> {#/template ROW2}
3
6,019,374
05/16/2011 15:08:15
755,870
05/16/2011 15:08:15
1
0
Writing text to Image in Google App Engine (Java)
I'm writing code that runs on Google App Engine (Java). What I'm trying to do is augment an existing image by adding text. GAE does not have any text handling in its ImagesService. Does anyone have any idea? I'd like my code to look something like this: ... // Read image byte[] pageData = readImage("images/page.png"); Image pageImage = ImagesServiceFactory.makeImage(pageData); // Add text here ... return pageImage;
java
image
google-app-engine
text
null
null
open
Writing text to Image in Google App Engine (Java) === I'm writing code that runs on Google App Engine (Java). What I'm trying to do is augment an existing image by adding text. GAE does not have any text handling in its ImagesService. Does anyone have any idea? I'd like my code to look something like this: ... // Read image byte[] pageData = readImage("images/page.png"); Image pageImage = ImagesServiceFactory.makeImage(pageData); // Add text here ... return pageImage;
0
10,986,348
06/11/2012 19:31:12
1,449,737
06/11/2012 19:28:02
1
0
Fatal Error, Class not found
I have picked up this code from a tutorial and have edited it make it suitable for my needs. <?php //if we got something through $_POST if (isset($_POST['search'])) { // here you would normally include some database connection include('config2.php'); $db = new db(); // never trust what user wrote! We must ALWAYS sanitize user input $word = mysql_real_escape_string($_POST['search']); // build your search query to the database $sql = "SELECT name FROM $tbl_name WHERE name LIKE '%" . $word . "%'"; // get results $row = $db->select_list($sql); if(count($row)) { $end_result = ''; foreach($row as $r) { $result = $r['title']; // we will use this to bold the search word in result $bold = '<span class="found">' . $word . '</span>'; $end_result .= '<li>' . str_ireplace($word, $bold, $result) . '</li>'; } echo $end_result; } else { echo '<li>No results found</li>'; } } ?> I am getting this error when I run the code: Fatal error: Class 'db' not found in /home/peltdyou/public_html/do_search.php on line 6 I am very new to PHP so could anyone shed some light onto my problem..
php
fatal-error
null
null
null
06/12/2012 08:11:01
too localized
Fatal Error, Class not found === I have picked up this code from a tutorial and have edited it make it suitable for my needs. <?php //if we got something through $_POST if (isset($_POST['search'])) { // here you would normally include some database connection include('config2.php'); $db = new db(); // never trust what user wrote! We must ALWAYS sanitize user input $word = mysql_real_escape_string($_POST['search']); // build your search query to the database $sql = "SELECT name FROM $tbl_name WHERE name LIKE '%" . $word . "%'"; // get results $row = $db->select_list($sql); if(count($row)) { $end_result = ''; foreach($row as $r) { $result = $r['title']; // we will use this to bold the search word in result $bold = '<span class="found">' . $word . '</span>'; $end_result .= '<li>' . str_ireplace($word, $bold, $result) . '</li>'; } echo $end_result; } else { echo '<li>No results found</li>'; } } ?> I am getting this error when I run the code: Fatal error: Class 'db' not found in /home/peltdyou/public_html/do_search.php on line 6 I am very new to PHP so could anyone shed some light onto my problem..
3
3,271,815
07/17/2010 14:13:59
466,534
04/21/2010 12:03:08
795
5
question about program
can anybody tell me what program is this? http://stackoverflow.com/questions/3271712/improvements-to-memory-leak-hunting? is this for memory measurment or what?i meant picture which is drawn here
untagged
null
null
null
null
07/12/2011 15:17:49
too localized
question about program === can anybody tell me what program is this? http://stackoverflow.com/questions/3271712/improvements-to-memory-leak-hunting? is this for memory measurment or what?i meant picture which is drawn here
3
8,896,877
01/17/2012 15:02:13
1,044,402
11/13/2011 17:19:37
1
0
How to Recover my encrypted files after reinstalling windows 7?
Plz help me out with this one.I encrypted some of my folders in windows using the pfx method.Then i took the backup of all that data on my external HD.i then reinstalled windows 7.now i am not able to view all those files.its giving access denied error...plz help me out with this one.. Thx in advance
pki
null
null
null
null
05/22/2012 13:51:42
off topic
How to Recover my encrypted files after reinstalling windows 7? === Plz help me out with this one.I encrypted some of my folders in windows using the pfx method.Then i took the backup of all that data on my external HD.i then reinstalled windows 7.now i am not able to view all those files.its giving access denied error...plz help me out with this one.. Thx in advance
2
1,707,310
11/10/2009 11:31:22
69,882
02/23/2009 13:38:50
506
8
Is it possible to use ref types in C# build-in Action<> delegate?
C# has build-in delegates Action<> and Func<>. Is it possible to use 'ref' type parameters for this delegates? For example, this code: public delegate void DTest( ref Guid a ); public event DTest ETest; Will compile. But if i use Action<>, it will not compile: public event Action< ref Guid > ETest; Any hints?
c#
null
null
null
null
null
open
Is it possible to use ref types in C# build-in Action<> delegate? === C# has build-in delegates Action<> and Func<>. Is it possible to use 'ref' type parameters for this delegates? For example, this code: public delegate void DTest( ref Guid a ); public event DTest ETest; Will compile. But if i use Action<>, it will not compile: public event Action< ref Guid > ETest; Any hints?
0
3,994,833
10/22/2010 07:48:50
297,373
03/19/2010 13:17:04
1,562
71
Windows CE uses UTF-16 or UCS-2?
Windows NT only supported UCS-2, then starting with Windows 2000 it started to support UTF-16. But what about Windows CE? It still supports only UCS-2 or the native charset is now UTF-16?
unicode
windows-ce
character-encoding
null
null
null
open
Windows CE uses UTF-16 or UCS-2? === Windows NT only supported UCS-2, then starting with Windows 2000 it started to support UTF-16. But what about Windows CE? It still supports only UCS-2 or the native charset is now UTF-16?
0
4,185,313
11/15/2010 14:32:53
382,140
07/02/2010 14:41:01
6
0
Load three UITableViews from different datasources
I have three uiTableViews on a view. I have created three different NSMutableArray loaded with different data. I need to place one of the NSMutableArray as the datasource for one of the UITableView. I am able to assign all three UITableViews datasource through the viewDidLoad of the form. But what I really need to do, is assign each of the UITableView datasource to a different NSMutableArray. How can I perform this task? thanks tony
xcode
uitableview
nsmutablearray
datasource
null
null
open
Load three UITableViews from different datasources === I have three uiTableViews on a view. I have created three different NSMutableArray loaded with different data. I need to place one of the NSMutableArray as the datasource for one of the UITableView. I am able to assign all three UITableViews datasource through the viewDidLoad of the form. But what I really need to do, is assign each of the UITableView datasource to a different NSMutableArray. How can I perform this task? thanks tony
0
11,178,615
06/24/2012 15:18:51
1,478,242
06/24/2012 15:05:03
1
0
Canvas - i want to outsource my Level
So im trying to make a Game with the Canvaselement and Javascript. Basically you have to get a Ball with your Mouse through a Labyrinth. Till now all my Code is in 2 Javascriptfiles. But i want to outsource the Levelpart here: window.onload = function(){ /*VARIABLES*/ //canvas var events = new Events("myCanvas"); var canvas = events.getCanvas(); var context = events.getContext(); //ball var rectX = 20; var rectY = 200; var draggingRect = false; var draggingRectOffsetX = 0; var draggingRectOffsetY = 0; //message var message = ""; //style var lingrad = context.createLinearGradient(0,0,0,450); lingrad.addColorStop(0.3, '#187694'); lingrad.addColorStop(0.6, '#1b8db2'); /*FUNCTIONS*/ function init() { canvas = document.getElementById("myCanvas"); canvas.width = width; canvas.height = height; context = canvas.getContext("2d"); }; events.setStage(function() { this.clear(); var mousePos = this.getMousePos(); if (draggingRect) { rectX = mousePos.x - draggingRectOffsetX; rectY = mousePos.y - draggingRectOffsetY; } /*CANVAS ELEMENTS*/ /*Ball*/ this.clear(); this.beginRegion(); context.beginPath(); context.arc(rectX, rectY, 7, 0, 2 * Math.PI, true); context.fillStyle = '#000'; context.fill(); context.closePath(); this.addRegionEventListener("mousedown", function() { draggingRect = true; var mousePos = events.getMousePos(); draggingRectOffsetX = mousePos.x - rectX; draggingRectOffsetY = mousePos.y - rectY; }); this.addRegionEventListener("mouseup", function() { draggingRect = false; }); this.addRegionEventListener("mouseover", function() { draggingRect = false; }); this.closeRegion(); /*WINAREA*/ this.beginRegion(); context.beginPath(); context.arc(800, 200, 100, 0, 2 * Math.PI, true); context.fillStyle = '#005450'; context.fill(); context.closePath(); this.addRegionEventListener("mouseover", function() { message = "You did it!"; }); this.closeRegion(); /*LANDSCAPE_DOWN*/ this.beginRegion(); context.beginPath(); context.fillStyle = lingrad; context.moveTo(0, 400); context.lineTo(170, 250); context.lineTo(230, 240); context.lineTo(380, 260); context.lineTo(460, 220); context.lineTo(500, 240); context.lineTo(700, 260); context.lineTo(800, 280); context.lineTo(800, 400); context.closePath(); context.fill(); this.addRegionEventListener("mousedown", function() { message = "Klick (Ball)"; }); this.addRegionEventListener("mouseup", function() { message = ""; }); this.addRegionEventListener("mouseover", function() { message = "Mouseover (Ball)"; }); this.addRegionEventListener("mouseout", function() { message = ""; /*"Mouseout (Ball)";*/ }); this.closeRegion(); /*LANDSCAPE UP*/ this.beginRegion(); context.beginPath(); context.fillStyle = lingrad; context.moveTo(0, 50); context.lineTo(80, 120); context.lineTo(290, 170); context.lineTo(490, 180); context.lineTo(590, 170); context.lineTo(690, 185); context.lineTo(800, 170); context.lineTo(800, 0); context.lineTo(0, 0); context.closePath(); context.fill(); this.addRegionEventListener("mouseover", function() { message = "Mouseover (test)"; inthewall = true; }); this.addRegionEventListener("mouseout", function() { message = ""; /*"Mouseout (test)";*/ }); this.closeRegion(); /*Message*/ writeMessage(context, message); }); // because of the setStage Function you dont need a listen Function }; function writeMessage(context, message){ context.font = "12pt Open Sans"; context.fillStyle = "#fff"; context.fillText(message, 15, 25); }; Im also using the Events.js from the HTML5 Canvas Cookbook http://www.html5canvastutorials.com/cookbook/ Can anyone help me?
javascript
html5
canvas
html5-canvas
outsourcing
06/24/2012 21:52:00
not a real question
Canvas - i want to outsource my Level === So im trying to make a Game with the Canvaselement and Javascript. Basically you have to get a Ball with your Mouse through a Labyrinth. Till now all my Code is in 2 Javascriptfiles. But i want to outsource the Levelpart here: window.onload = function(){ /*VARIABLES*/ //canvas var events = new Events("myCanvas"); var canvas = events.getCanvas(); var context = events.getContext(); //ball var rectX = 20; var rectY = 200; var draggingRect = false; var draggingRectOffsetX = 0; var draggingRectOffsetY = 0; //message var message = ""; //style var lingrad = context.createLinearGradient(0,0,0,450); lingrad.addColorStop(0.3, '#187694'); lingrad.addColorStop(0.6, '#1b8db2'); /*FUNCTIONS*/ function init() { canvas = document.getElementById("myCanvas"); canvas.width = width; canvas.height = height; context = canvas.getContext("2d"); }; events.setStage(function() { this.clear(); var mousePos = this.getMousePos(); if (draggingRect) { rectX = mousePos.x - draggingRectOffsetX; rectY = mousePos.y - draggingRectOffsetY; } /*CANVAS ELEMENTS*/ /*Ball*/ this.clear(); this.beginRegion(); context.beginPath(); context.arc(rectX, rectY, 7, 0, 2 * Math.PI, true); context.fillStyle = '#000'; context.fill(); context.closePath(); this.addRegionEventListener("mousedown", function() { draggingRect = true; var mousePos = events.getMousePos(); draggingRectOffsetX = mousePos.x - rectX; draggingRectOffsetY = mousePos.y - rectY; }); this.addRegionEventListener("mouseup", function() { draggingRect = false; }); this.addRegionEventListener("mouseover", function() { draggingRect = false; }); this.closeRegion(); /*WINAREA*/ this.beginRegion(); context.beginPath(); context.arc(800, 200, 100, 0, 2 * Math.PI, true); context.fillStyle = '#005450'; context.fill(); context.closePath(); this.addRegionEventListener("mouseover", function() { message = "You did it!"; }); this.closeRegion(); /*LANDSCAPE_DOWN*/ this.beginRegion(); context.beginPath(); context.fillStyle = lingrad; context.moveTo(0, 400); context.lineTo(170, 250); context.lineTo(230, 240); context.lineTo(380, 260); context.lineTo(460, 220); context.lineTo(500, 240); context.lineTo(700, 260); context.lineTo(800, 280); context.lineTo(800, 400); context.closePath(); context.fill(); this.addRegionEventListener("mousedown", function() { message = "Klick (Ball)"; }); this.addRegionEventListener("mouseup", function() { message = ""; }); this.addRegionEventListener("mouseover", function() { message = "Mouseover (Ball)"; }); this.addRegionEventListener("mouseout", function() { message = ""; /*"Mouseout (Ball)";*/ }); this.closeRegion(); /*LANDSCAPE UP*/ this.beginRegion(); context.beginPath(); context.fillStyle = lingrad; context.moveTo(0, 50); context.lineTo(80, 120); context.lineTo(290, 170); context.lineTo(490, 180); context.lineTo(590, 170); context.lineTo(690, 185); context.lineTo(800, 170); context.lineTo(800, 0); context.lineTo(0, 0); context.closePath(); context.fill(); this.addRegionEventListener("mouseover", function() { message = "Mouseover (test)"; inthewall = true; }); this.addRegionEventListener("mouseout", function() { message = ""; /*"Mouseout (test)";*/ }); this.closeRegion(); /*Message*/ writeMessage(context, message); }); // because of the setStage Function you dont need a listen Function }; function writeMessage(context, message){ context.font = "12pt Open Sans"; context.fillStyle = "#fff"; context.fillText(message, 15, 25); }; Im also using the Events.js from the HTML5 Canvas Cookbook http://www.html5canvastutorials.com/cookbook/ Can anyone help me?
1
7,318,919
09/06/2011 11:09:31
619,420
02/16/2011 10:08:01
10
0
iMovie '11; How to relink source clip missing?
I want to place my source video to another folder, I tried the plutil -convert xml method and open & change the clip location it in text edit then convert back to binary again. But iMovie '11 seems won't detect the project.
osx
imovie
null
null
null
09/06/2011 14:14:27
off topic
iMovie '11; How to relink source clip missing? === I want to place my source video to another folder, I tried the plutil -convert xml method and open & change the clip location it in text edit then convert back to binary again. But iMovie '11 seems won't detect the project.
2
7,879,917
10/24/2011 18:13:30
89,863
04/11/2009 22:34:34
236
3
Looking for resources about using good practices for large ASP MVC projects
I am a silverlight and wpf developer, but I need start a new project with ASP.NET having not done much with ASP at all. It is going to be a large project so it needs to be done right in terms of architecture. I am looking at 2 areas for information and opinions from those experienced with ASP: 1) patterns and guidelines for scalability, manageability, extensibility. This is not so much libraries and tools, but guidance for handling the common problems you face in large-scale projects in an architecturally clean way. Similar to prism guidance for silverlight/wpf. 2) tools and frameworks to check out for a large line of business ASP app Using MVC and jquery is pretty much a given. I also plan on using entity framework, and MEF as I am familiar with them. I am open to any words of wisdom from those experienced with large ASP projects. It's a very open-ended question because I am not providing any of my design requirements, but I am looking for mainly buzzwords and patterns/tool that I need to be aware of (not necessarily use). I need high-level information (architecture) and not detail. I can research the detail as needed.
asp.net
asp.net-mvc
asp.net-mvc-3
architecture
null
null
open
Looking for resources about using good practices for large ASP MVC projects === I am a silverlight and wpf developer, but I need start a new project with ASP.NET having not done much with ASP at all. It is going to be a large project so it needs to be done right in terms of architecture. I am looking at 2 areas for information and opinions from those experienced with ASP: 1) patterns and guidelines for scalability, manageability, extensibility. This is not so much libraries and tools, but guidance for handling the common problems you face in large-scale projects in an architecturally clean way. Similar to prism guidance for silverlight/wpf. 2) tools and frameworks to check out for a large line of business ASP app Using MVC and jquery is pretty much a given. I also plan on using entity framework, and MEF as I am familiar with them. I am open to any words of wisdom from those experienced with large ASP projects. It's a very open-ended question because I am not providing any of my design requirements, but I am looking for mainly buzzwords and patterns/tool that I need to be aware of (not necessarily use). I need high-level information (architecture) and not detail. I can research the detail as needed.
0
7,929,957
10/28/2011 13:32:29
943,899
09/14/2011 05:23:43
21
0
How to move the text inside a Qlabel?
I need to move the text inside a label from right to left. Please help me.
qt
null
null
null
null
10/29/2011 12:05:15
not a real question
How to move the text inside a Qlabel? === I need to move the text inside a label from right to left. Please help me.
1
10,140,191
04/13/2012 11:45:45
281,014
02/25/2010 08:02:52
1,370
37
disable form field saving in browser, autocomplete
I am trying to disable autocomplete feature in browser and put autocomplete="off" attribute on Input. I have tried to use code below but it do not put autocomplete="off" on generated Input html tag. What is the correct way to do this? @Html.EditorFor(model => model.ConfirmPassword, new { autocomplete = "off" })
asp.net-mvc-3
null
null
null
null
null
open
disable form field saving in browser, autocomplete === I am trying to disable autocomplete feature in browser and put autocomplete="off" attribute on Input. I have tried to use code below but it do not put autocomplete="off" on generated Input html tag. What is the correct way to do this? @Html.EditorFor(model => model.ConfirmPassword, new { autocomplete = "off" })
0
8,780,235
01/08/2012 18:51:29
1,137,424
01/08/2012 18:42:22
1
0
SC Java Programmer 6 exam
there is program from exam. Could anyone explain how "-434" is the answer: class A {} class B extends A {} public class ComingThru { static String s = "-"; public static void main (String[] args) { A[] aa = new A[2]; B[] ba = new B[2]; sifter(aa); sifter(ba); sifter(7); System.out.print(s); } static void sifter(A[]... a2) { s +="1";} static void sifter(B[]... b1) { s +="2";} static void sifter(B[] b1) {s += "3";} static void sifter(Object o) {s += "4";} } Thank you!
java
null
null
null
null
01/09/2012 19:07:04
too localized
SC Java Programmer 6 exam === there is program from exam. Could anyone explain how "-434" is the answer: class A {} class B extends A {} public class ComingThru { static String s = "-"; public static void main (String[] args) { A[] aa = new A[2]; B[] ba = new B[2]; sifter(aa); sifter(ba); sifter(7); System.out.print(s); } static void sifter(A[]... a2) { s +="1";} static void sifter(B[]... b1) { s +="2";} static void sifter(B[] b1) {s += "3";} static void sifter(Object o) {s += "4";} } Thank you!
3
10,299,231
04/24/2012 13:46:56
247,702
01/11/2010 00:22:39
764
39
Unable to debug when a custom 401 error page is set
<httpErrors errorMode="Custom"> <remove statusCode="401" /> <error statusCode="401" path="/error/unauthorised" responseMode="Redirect" /> </httpErrors> Now, when I try to debug, I get the following error message: > Unable to start debugging on the web server. Could not start ASP.NET debugging. Is there a workaround that doesn't involve disabling the error page or using `errorMode="DetailedLocalOnly"`?
asp.net-mvc-3
null
null
null
null
null
open
Unable to debug when a custom 401 error page is set === <httpErrors errorMode="Custom"> <remove statusCode="401" /> <error statusCode="401" path="/error/unauthorised" responseMode="Redirect" /> </httpErrors> Now, when I try to debug, I get the following error message: > Unable to start debugging on the web server. Could not start ASP.NET debugging. Is there a workaround that doesn't involve disabling the error page or using `errorMode="DetailedLocalOnly"`?
0
3,493,937
08/16/2010 14:11:53
421,819
08/16/2010 14:11:53
1
0
how to position 12 circles evenly in a big circle
how to position 12 circles evenly in a big circle
geometry
null
null
null
null
08/16/2010 14:20:52
not a real question
how to position 12 circles evenly in a big circle === how to position 12 circles evenly in a big circle
1
7,846,016
10/21/2011 07:01:49
1,006,535
10/21/2011 06:18:31
1
0
which is the best programing language to start with?
I am a new programmer and i would like to know which is the best language to start with? i know a little bit of **php** but i want to be careful with the current common languages that are widely used i did a little bit of wordpress too but very limited knowledge and would like to improve my skills in the most commonly used language is **.NET** an option? or **javascript**? what is the best way to go with for front-end developing? Thanks
c#
javascript
programming-languages
null
null
10/21/2011 07:12:36
not constructive
which is the best programing language to start with? === I am a new programmer and i would like to know which is the best language to start with? i know a little bit of **php** but i want to be careful with the current common languages that are widely used i did a little bit of wordpress too but very limited knowledge and would like to improve my skills in the most commonly used language is **.NET** an option? or **javascript**? what is the best way to go with for front-end developing? Thanks
4
10,901,458
06/05/2012 16:51:10
326,389
04/26/2010 22:15:45
2,390
4
How to upgrade Ruby patch level for 1.9.3 in RVM?
Based on a previous StackOverflow question it looked like the correct way to upgrade Ruby to the latest patch level was this: $ rvm upgrade 1.9.2 1.9.2-p0 Are you sure you wish to upgrade from ruby-1.9.2-p0 to ruby-1.9.2-p136? (Y/n): Y However, this doesn't seem to work for me: $ rvm upgrade 1.9.3 1.9.3-p0 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p0 1.9.3 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p0 1.9.3-p194 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p194 1.9.3-p0 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n Cancelling upgrade. Is there a more appropriate way to upgrade Ruby versions with RVM?
ruby
rvm
upgrade
null
null
null
open
How to upgrade Ruby patch level for 1.9.3 in RVM? === Based on a previous StackOverflow question it looked like the correct way to upgrade Ruby to the latest patch level was this: $ rvm upgrade 1.9.2 1.9.2-p0 Are you sure you wish to upgrade from ruby-1.9.2-p0 to ruby-1.9.2-p136? (Y/n): Y However, this doesn't seem to work for me: $ rvm upgrade 1.9.3 1.9.3-p0 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p0 1.9.3 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p0 1.9.3-p194 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n Cancelling upgrade. $ rvm upgrade 1.9.3-p194 1.9.3-p0 Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n Cancelling upgrade. Is there a more appropriate way to upgrade Ruby versions with RVM?
0
4,125,437
11/08/2010 15:51:55
264,292
10/21/2009 18:05:04
350
28
string to fit rectangle
how to implement manually drawing string to fit it into the rectangle. i can calculate the length of the string in pixels.
c++
pseudocode
null
null
null
11/08/2010 22:41:18
not a real question
string to fit rectangle === how to implement manually drawing string to fit it into the rectangle. i can calculate the length of the string in pixels.
1
3,121,686
06/25/2010 21:51:41
245,878
01/07/2010 20:03:38
40
2
MSSQL 2008 hosting recommendations.
I am currently working on a project that is hosted at GoDaddy and it has a large database. (Periodically inserting millions of rows). It keeps filling the transaction logs and since GoDaddy sets the SQL user up without permission to basically do anything, I cannot truncate it. The 200mb database max is not ideal either. A VPS isn't in the cards for this company just yet, so I am stuck trying to find a shared hosting provider that office MSSQL2008 only hosting. Soooooo, my question is, does anyone know of a hosting company that does MSSQL2008 hosting that they can vouch for and give high marks? Cheers guys & gals!
sql
database
hosting
shared-hosting
null
06/26/2010 11:30:29
off topic
MSSQL 2008 hosting recommendations. === I am currently working on a project that is hosted at GoDaddy and it has a large database. (Periodically inserting millions of rows). It keeps filling the transaction logs and since GoDaddy sets the SQL user up without permission to basically do anything, I cannot truncate it. The 200mb database max is not ideal either. A VPS isn't in the cards for this company just yet, so I am stuck trying to find a shared hosting provider that office MSSQL2008 only hosting. Soooooo, my question is, does anyone know of a hosting company that does MSSQL2008 hosting that they can vouch for and give high marks? Cheers guys & gals!
2
11,329,112
07/04/2012 12:27:59
1,501,559
07/04/2012 12:25:28
1
0
Can anyone post the c++ code for joystick in cocos2d-x
cant find the way to implement a joystick in cocos2d-x. can anyone post any program they created with implementation of joystick in c++ framework..ty^^
ios
null
null
null
null
07/05/2012 01:38:12
not constructive
Can anyone post the c++ code for joystick in cocos2d-x === cant find the way to implement a joystick in cocos2d-x. can anyone post any program they created with implementation of joystick in c++ framework..ty^^
4