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
6,338,711
06/14/2011 03:17:05
732,749
04/30/2011 20:52:47
1
0
custom interface cocoa xcode 4
how can i create custom interfaces in xcode 4? i've seen programs like Kaleidoscope (http://designshack.co.uk/images/designs/kaleidoscope-for-mac.jpg) using custom controls or something not available for drag and drop on xode. any help? thanks
xcode
cocoa
interface
interface-builder
null
06/14/2011 06:38:51
not a real question
custom interface cocoa xcode 4 === how can i create custom interfaces in xcode 4? i've seen programs like Kaleidoscope (http://designshack.co.uk/images/designs/kaleidoscope-for-mac.jpg) using custom controls or something not available for drag and drop on xode. any help? thanks
1
744,966
04/13/2009 18:52:21
21,209
09/23/2008 16:03:51
367
23
ANy open source C# OCR library?
I couldn't get anything out of google, so I ask: Do you know some free open source C# OCR library?
c#
ocr
free
null
null
06/05/2012 23:16:18
not constructive
ANy open source C# OCR library? === I couldn't get anything out of google, so I ask: Do you know some free open source C# OCR library?
4
3,827,104
09/30/2010 01:29:32
303,911
03/29/2010 03:14:32
3,928
190
How to send commands to telnet and leave session open
I have to connect to a remote server via telnet and want to send file input there. This is a processor emulator (MCF68k), so I can't just scp the file to the server and run from there. I can send input like this: `telnet host.name < input.file` Which will successfully transmit the data to the server and run the commands stored that I want. However, I need the telnet session to stay interactive (not terminate). How do I pipe a file to a command, then return control of stdin to the terminal and keep the interactive session open?
unix
pipes
telnet
null
null
10/01/2010 10:16:56
off topic
How to send commands to telnet and leave session open === I have to connect to a remote server via telnet and want to send file input there. This is a processor emulator (MCF68k), so I can't just scp the file to the server and run from there. I can send input like this: `telnet host.name < input.file` Which will successfully transmit the data to the server and run the commands stored that I want. However, I need the telnet session to stay interactive (not terminate). How do I pipe a file to a command, then return control of stdin to the terminal and keep the interactive session open?
2
3,171,099
07/03/2010 09:54:38
87,154
04/04/2009 19:51:53
90
2
SQL how to count all rows up to a max value
I am having trouble counting the number of rows until it reaches a certain PK. My PK is called id and I want to count all rows until i reach a specified id I have tried using this query but it doesn't work probably becuase I am using a MySQL table select max(count(*)) from news where id=18 group by id I get this error >Invalid use of group function
mysql
count
max
null
null
null
open
SQL how to count all rows up to a max value === I am having trouble counting the number of rows until it reaches a certain PK. My PK is called id and I want to count all rows until i reach a specified id I have tried using this query but it doesn't work probably becuase I am using a MySQL table select max(count(*)) from news where id=18 group by id I get this error >Invalid use of group function
0
9,527,945
03/02/2012 04:23:30
983,438
10/07/2011 05:48:59
166
1
Find largest image
I am using the following to find the image within `.content` and apply it's width to the `.project` parent width. $('.content').find('img').each(function () { var $this = $(this), width = $this.width(); { $(this).closest('.project').css("width", width); } }); My problem is that it doesn't find the *largest* image in the `.content` and sometimes applies a width that is smaller than the largest image and is creating problems with my layout. Any help would be great. Thanks.
jquery
image
width
null
null
null
open
Find largest image === I am using the following to find the image within `.content` and apply it's width to the `.project` parent width. $('.content').find('img').each(function () { var $this = $(this), width = $this.width(); { $(this).closest('.project').css("width", width); } }); My problem is that it doesn't find the *largest* image in the `.content` and sometimes applies a width that is smaller than the largest image and is creating problems with my layout. Any help would be great. Thanks.
0
6,678,187
07/13/2011 11:33:22
842,585
07/13/2011 11:33:22
1
0
Camera orientation problem....android!!!!!.......urgent!!!!!
Android Camera Code problem....urgent!!!!! Helllo frnds.I am creating android application which uses camera code.I have used android-API 2.1 . I have installed my application on dell mobile and the orientation of camera is correct.However, i installed my application in other android mobiles like samsung galaxy s2 etc.Here,the problem is with camera orientation , even in portrait mode the camera is rotated 90 degrees.Can any1 suggest me if any camera parameteres need to be changed so that camera orientation works well on all mobiles...Here is my code: //class CameraDemo public class CameraDemo extends Activity { private static final String TAG = "CameraDemo"; Camera camera; Preview preview; Button buttonClick; Button next; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); setContentView(R.layout.camdemo); preview = new Preview(this); ((FrameLayout) findViewById(R.id.preview)).addView(preview); buttonClick = (Button) findViewById(R.id.buttonClick); next = (Button) findViewById(R.id.next); buttonClick.setOnClickListener( new OnClickListener() { public void onClick(View v) { preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback); try{ Constants.takepic=1; buttonClick.setEnabled(false); //once click is clicked, its disable } catch(Exception e) { e.printStackTrace(); } } }); next.setOnClickListener( new OnClickListener() { public void onClick(View v) { //preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback); if(Constants.takepic==1) { Intent intent_new=new Intent(CameraDemo.this,NotesAndUpload.class); startActivity(intent_new); } else { Toast.makeText(CameraDemo.this, "Take a picture",5); } } }); Log.d(TAG, "onCreate'd"); } catch(Exception e ){} } ShutterCallback shutterCallback = new ShutterCallback() { public void onShutter() { Log.d(TAG, "onShutter'd"); } }; /** Handles data for raw picture */ PictureCallback rawCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { Log.d(TAG, "onPictureTaken - raw"); } }; /** Handles data for jpeg picture */ PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { //taking time and date Constants.dateValue=dateAndTime("yyyy-MM-dd"); Constants.timeValue=dateAndTime("HH:mm:ss"); FileOutputStream outStream = null; try { // write to local sandbox file system // outStream = CameraDemo.this.openFileOutput(String.format("%d.j pg", System.currentTimeMillis()), 0); // Or write to sdcard long imageNameLong=System.currentTimeMillis(); Constants.imageName=new Long(imageNameLong).toString(); outStream = new FileOutputStream(String.format("/sdcard/%d.jpg",imageNameLong)); outStream.write(data); Constants.takepic=1; outStream.close(); Log.d(TAG, "onPictureTaken - wrote bytes: " + data.length); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { } Log.d(TAG, "onPictureTaken - jpeg"); } }; } //Preview Class class Preview extends SurfaceView implements SurfaceHolder.Callback { private static final String TAG = "Preview"; SurfaceHolder mHolder; public Camera camera; Preview(Context context) { super(context); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BU FFERS); } public void surfaceCreated(SurfaceHolder holder) { // The Surface has been created, acquire the camera and tell it where // to draw. camera = Camera.open(); try { camera.setPreviewDisplay(holder); camera.setPreviewCallback(new PreviewCallback() { public void onPreviewFrame(byte[] data, Camera arg1) { /*FileOutputStream outStream = null; try { outStream = new FileOutputStream(String.format("/sdcard/%d.jpg", System.currentTimeMillis())); outStream.write(data); outStream.close(); Log.d(TAG, "onPreviewFrame - wrote bytes: " + data.length); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { }*/ Preview.this.invalidate(); } }); } catch (IOException e) { e.printStackTrace(); } } public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return, so stop the preview. // Because the CameraDevice object is not a shared resource, it's very // important to release it when the activity is paused. camera.stopPreview(); camera = null; } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. //CAMERA PARAMETERS NEED TO BE CHANGED :- Camera.Parameters parameters = camera.getParameters(); parameters.setPreviewSize(w, h); if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { parameters.set("rotation",90); parameters.set("orientation", "portrait"); } if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { parameters.set("rotation", 90); parameters.set("orientation", "landscape"); } parameters.set("jpeg-quality", 50); camera.setParameters(parameters); camera.startPreview(); } @Override public void draw(Canvas canvas) { super.draw(canvas); Paint p= new Paint(Color.RED); Log.d(TAG,"draw"); canvas.drawText("PREVIEW", canvas.getWidth()/2, canvas.getHeight()/2, p ); } }
android
camera
orientation
null
null
07/17/2011 08:18:43
not a real question
Camera orientation problem....android!!!!!.......urgent!!!!! === Android Camera Code problem....urgent!!!!! Helllo frnds.I am creating android application which uses camera code.I have used android-API 2.1 . I have installed my application on dell mobile and the orientation of camera is correct.However, i installed my application in other android mobiles like samsung galaxy s2 etc.Here,the problem is with camera orientation , even in portrait mode the camera is rotated 90 degrees.Can any1 suggest me if any camera parameteres need to be changed so that camera orientation works well on all mobiles...Here is my code: //class CameraDemo public class CameraDemo extends Activity { private static final String TAG = "CameraDemo"; Camera camera; Preview preview; Button buttonClick; Button next; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); setContentView(R.layout.camdemo); preview = new Preview(this); ((FrameLayout) findViewById(R.id.preview)).addView(preview); buttonClick = (Button) findViewById(R.id.buttonClick); next = (Button) findViewById(R.id.next); buttonClick.setOnClickListener( new OnClickListener() { public void onClick(View v) { preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback); try{ Constants.takepic=1; buttonClick.setEnabled(false); //once click is clicked, its disable } catch(Exception e) { e.printStackTrace(); } } }); next.setOnClickListener( new OnClickListener() { public void onClick(View v) { //preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback); if(Constants.takepic==1) { Intent intent_new=new Intent(CameraDemo.this,NotesAndUpload.class); startActivity(intent_new); } else { Toast.makeText(CameraDemo.this, "Take a picture",5); } } }); Log.d(TAG, "onCreate'd"); } catch(Exception e ){} } ShutterCallback shutterCallback = new ShutterCallback() { public void onShutter() { Log.d(TAG, "onShutter'd"); } }; /** Handles data for raw picture */ PictureCallback rawCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { Log.d(TAG, "onPictureTaken - raw"); } }; /** Handles data for jpeg picture */ PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { //taking time and date Constants.dateValue=dateAndTime("yyyy-MM-dd"); Constants.timeValue=dateAndTime("HH:mm:ss"); FileOutputStream outStream = null; try { // write to local sandbox file system // outStream = CameraDemo.this.openFileOutput(String.format("%d.j pg", System.currentTimeMillis()), 0); // Or write to sdcard long imageNameLong=System.currentTimeMillis(); Constants.imageName=new Long(imageNameLong).toString(); outStream = new FileOutputStream(String.format("/sdcard/%d.jpg",imageNameLong)); outStream.write(data); Constants.takepic=1; outStream.close(); Log.d(TAG, "onPictureTaken - wrote bytes: " + data.length); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { } Log.d(TAG, "onPictureTaken - jpeg"); } }; } //Preview Class class Preview extends SurfaceView implements SurfaceHolder.Callback { private static final String TAG = "Preview"; SurfaceHolder mHolder; public Camera camera; Preview(Context context) { super(context); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BU FFERS); } public void surfaceCreated(SurfaceHolder holder) { // The Surface has been created, acquire the camera and tell it where // to draw. camera = Camera.open(); try { camera.setPreviewDisplay(holder); camera.setPreviewCallback(new PreviewCallback() { public void onPreviewFrame(byte[] data, Camera arg1) { /*FileOutputStream outStream = null; try { outStream = new FileOutputStream(String.format("/sdcard/%d.jpg", System.currentTimeMillis())); outStream.write(data); outStream.close(); Log.d(TAG, "onPreviewFrame - wrote bytes: " + data.length); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { }*/ Preview.this.invalidate(); } }); } catch (IOException e) { e.printStackTrace(); } } public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return, so stop the preview. // Because the CameraDevice object is not a shared resource, it's very // important to release it when the activity is paused. camera.stopPreview(); camera = null; } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. //CAMERA PARAMETERS NEED TO BE CHANGED :- Camera.Parameters parameters = camera.getParameters(); parameters.setPreviewSize(w, h); if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { parameters.set("rotation",90); parameters.set("orientation", "portrait"); } if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { parameters.set("rotation", 90); parameters.set("orientation", "landscape"); } parameters.set("jpeg-quality", 50); camera.setParameters(parameters); camera.startPreview(); } @Override public void draw(Canvas canvas) { super.draw(canvas); Paint p= new Paint(Color.RED); Log.d(TAG,"draw"); canvas.drawText("PREVIEW", canvas.getWidth()/2, canvas.getHeight()/2, p ); } }
1
9,169,497
02/07/2012 00:36:27
679,475
03/28/2011 00:13:13
127
9
Handles Me.Closing e.Cancel Is Failing With NotifyIcon
My program prompts the user to save info upon exit. If Yes is clicked > Program closes. If Cancel is clicked > Program stays open. This is an example: Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) End If End Sub The above works fine, also this works fine (In the sense that if Yes or Cancel is clicked the program wont close): Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) e.Cancel = True End If End Sub What I am having issues understanding after seeing how the above 2 both work is why the hell this wont work: Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing If e.CloseReason <> 0 Then e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) Else e.Cancel = True End If End Sub Upon form minimize e.CloseReason = 0 (Tested with MessageBox popups). So e.Cancel then equals True but the program closes itself down anyway! The only ammendmant that my NotifyIcon makes is Me.Visible = False: Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged If Me.WindowState = FormWindowState.Minimized Then Me.WindowState = FormWindowState.Minimized Me.Visible = False NotifyIcon1.Visible = True NotifyIcon1.BalloonTipText = "Minimized To The Tray" & vbCrLf & "Click This Icon To Display The Main Screen" NotifyIcon1.ShowBalloonTip(5000) End If End Sub How can I prevent the program from closing while using a NotifyIcon in this way?
c#
vb.net
visual-studio-2010
forms
notifyicon
02/07/2012 13:54:32
too localized
Handles Me.Closing e.Cancel Is Failing With NotifyIcon === My program prompts the user to save info upon exit. If Yes is clicked > Program closes. If Cancel is clicked > Program stays open. This is an example: Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) End If End Sub The above works fine, also this works fine (In the sense that if Yes or Cancel is clicked the program wont close): Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) e.Cancel = True End If End Sub What I am having issues understanding after seeing how the above 2 both work is why the hell this wont work: Private Sub Form_Close(ByVal sender As System.Object, ByVal e As FormClosingEventArgs) Handles Me.Closing If e.CloseReason <> 0 Then e.Cancel = (MessageBox.Show("Are You Sure You Want To Exit?", "Backup Data", MessageBoxButtons.YesNo) = DialogResult.No) Else e.Cancel = True End If End Sub Upon form minimize e.CloseReason = 0 (Tested with MessageBox popups). So e.Cancel then equals True but the program closes itself down anyway! The only ammendmant that my NotifyIcon makes is Me.Visible = False: Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged If Me.WindowState = FormWindowState.Minimized Then Me.WindowState = FormWindowState.Minimized Me.Visible = False NotifyIcon1.Visible = True NotifyIcon1.BalloonTipText = "Minimized To The Tray" & vbCrLf & "Click This Icon To Display The Main Screen" NotifyIcon1.ShowBalloonTip(5000) End If End Sub How can I prevent the program from closing while using a NotifyIcon in this way?
3
1,634,241
10/27/2009 23:18:51
114,865
05/30/2009 18:19:38
236
15
htaccess rewrite rule doesn't work with dashes?
my htaccess rule isn't working with rewrite with dashes in: RewriteRule ^([A-Za-z]+)$ index.php?do=$1 [QSA] so, www.domain.com/rules works, however, www.domain.com/about-us doesn't I've verified that www.domain.com/index.php?do=about-us works so it's definately a rewrite issue. Thanks.
url-rewriting
null
null
null
null
null
open
htaccess rewrite rule doesn't work with dashes? === my htaccess rule isn't working with rewrite with dashes in: RewriteRule ^([A-Za-z]+)$ index.php?do=$1 [QSA] so, www.domain.com/rules works, however, www.domain.com/about-us doesn't I've verified that www.domain.com/index.php?do=about-us works so it's definately a rewrite issue. Thanks.
0
5,000,608
02/15/2011 06:38:58
272,398
02/13/2010 13:16:01
332
4
Setting up bundler behind proxy - Installation and Detiction Issue related to Ruby Gems
I am trying to set up Diaspora on my machine. I am using the following installation URL: https://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora I am trying to get the bundle install command to work for me behind a proxy( I am currently at work, thus behind a proxy ). I have manually installed the gems( I had no choice on it; at that time), required for my app. I am facing the following error on this regard. mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle install Fetching source index for http://rubygems.org/ /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `initialize': not in gzip format (Zlib::GzipFile::Error) from /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `new' from /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `gunzip' from /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:177:in `fetch_path' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:270:in `load_specs' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:243:in `list' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:239:in `each' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:239:in `list' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:236:in `fetch_all_remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:217:in `remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:214:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:214:in `remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:154:in `fetch_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/index.rb:7:in `build' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:151:in `fetch_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:66:in `specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:159:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:158:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:158:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/index.rb:7:in `build' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:157:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:151:in `resolve' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:90:in `specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:85:in `resolve_remotely!' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:35:in `run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/bin/bundle:13 from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19 mohnish@pc146724-desktop:~/Diaspora/diaspora$ I am not sure whats causing it and how to overcome it. I have a feeling that bundle is not able to detect the gems I have already installed. I also tried out the following command: bundle exec rake db:create. It says it could not find the gem , although I have already installed it. The error I get is given below: mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle exec rake db:create Could not find gem 'em-websocket (>= 0, runtime)' in any of the gem sources listed in your Gemfile. mohnish@pc146724-desktop:~/Diaspora/diaspora$ My gem list looks like this: mohnish@pc146724-desktop:~/Diaspora/diaspora$ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.3, 2.0.2) actionpack (3.0.3, 2.0.2) activemodel (3.0.3) activerecord (3.0.3, 2.0.2) activerecord-jdbcmysql-adapter (0.9.2) activeresource (3.0.3, 2.0.2) activesupport (3.0.3, 2.0.2) addressable (2.2.4, 2.2.2) arel (2.0.2) aws (2.3.32) bcrypt-ruby (2.1.4) builder (3.0.0, 2.1.2) bundler (1.0.10) bunny (0.6.0) calendar_date_select (1.11.1) capistrano (2.5.19) capistrano-ext (1.2.1) capybara (0.3.9) carrierwave (0.5.1) cgi_multipart_eof_fix (2.5.0) chef (0.9.12) childprocess (0.1.7) closure-compiler (1.0.0) cloudfiles (1.4.10) columnize (0.1) configuration (0.0.5) crack (0.1.7) cucumber (0.10.0) cucumber-rails (0.3.2) culerity (0.2.15) daemons (1.1.0) database_cleaner (0.6.0) devise (1.1.3) devise_invitable (0.3.5) diff-lcs (1.1.2) dispatcher (0.0.1) em-websocket (0.2.0) erubis (2.6.6) eventmachine (0.12.10, 0.12.6) excon (0.2.4) extlib (0.9.15) factory_girl (1.3.0) factory_girl_rails (1.0.1) faraday (0.5.5) faraday_middleware (0.3.2) fastercsv (1.5.4) fastthread (1.0.7) ffi (1.0.5, 0.6.3, 0.5.1) fixture_builder (0.2.0) fog (0.3.25) formatador (0.0.16) fuubar (0.0.3) gem_plugin (0.2.3) gherkin (2.3.3) googlecharts (1.6.1) haml (3.0.25) hashie (1.0.0) highline (1.6.1) hoe (2.8.0) http_accept_language (1.0.1) http_connection (1.4.0) i18n (0.4.0) jammit (0.5.4) jasmine (1.0.1.1) jdbc-mysql (5.1.13) json (1.4.6) json_pure (1.5.1) launchy (0.3.7) linecache (0.42) mail (2.2.15) mime-types (1.16) mini_magick (3.2) mixlib-authentication (1.1.4) mixlib-cli (1.2.0) mixlib-config (1.1.2) mixlib-log (1.2.0) mocha (0.9.12) moneta (0.6.0) mongrel (1.1.5) multi_json (0.0.5) multi_xml (0.2.1) multipart-post (1.1.0) mysql (2.8.1) mysql2 (0.2.6) net-ldap (0.1.1) net-scp (1.0.4) net-sftp (2.0.5) net-ssh (2.1.0, 2.0.23) net-ssh-gateway (1.0.1) nokogiri (1.4.4, 1.4.3.1) oa-basic (0.1.6) oa-core (0.1.6) oa-enterprise (0.1.6) oa-oauth (0.1.6) oa-openid (0.1.6) oauth (0.4.0) oauth2 (0.1.0) ohai (0.5.8) okkez-open_id_authentication (1.0.1) omniauth (0.1.6) polyglot (0.3.1) pyu-ruby-sasl (0.0.3.2) rack (1.2.1) rack-mount (0.6.13) rack-openid (1.2.0) rack-test (0.5.7) rails (3.0.3, 2.0.2) railties (3.0.3) rake (0.8.7) rake-compiler (0.7.5) redis (2.1.1) redis-namespace (0.10.0, 0.8.0) resque (1.10.0) rest-client (1.6.1) roxml (3.1.6) rspec (2.5.0) rspec-core (2.5.0) rspec-expectations (2.5.0) rspec-instafail (0.1.6) rspec-mocks (2.5.0) rspec-rails (2.5.0) ruby-debug (0.10.4) ruby-debug-base (0.10.4) ruby-hmac (0.4.0) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) ruby-progressbar (0.0.9) rubyntlm (0.1.1) rubyzip (0.9.4) sanitize (2.0.0) selenium-client (1.2.17, 1.2.16) selenium-rc (2.1.0) selenium-webdriver (0.1.2) simple_oauth (0.1.4) sinatra (0.9.2) sqlite3 (0.0.2) ssl_requirement (0.1.0) subexec (0.0.4) SystemTimer (1.2.1) systemu (1.2.0) term-ansicolor (1.0.5) thin (1.2.7) thor (0.14.4) treetop (1.4.9) twitter (1.1.2) tzinfo (0.3.23) uuidtools (2.1.2) vegas (0.1.2) warden (1.0.3, 0.10.7) weakling (0.0.3) webmock (1.6.2) whitelist (0.0.1) will_paginate (3.0.pre2, 2.2.0) xml-simple (1.0.14) yui-compressor (0.9.1) mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle show em-websocket (0.2.0) bash: syntax error near unexpected token `(' mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle show em-websocket Could not find gem 'em-websocket (>= 0, runtime)' in any of the gem sources listed in your Gemfile. mohnish@pc146724-desktop:~/Diaspora/diaspora$ Any suggestions, on how can I overcome these issues. I really could use any help.. Thank you..
ruby-on-rails
rubygems
bundle
null
null
null
open
Setting up bundler behind proxy - Installation and Detiction Issue related to Ruby Gems === I am trying to set up Diaspora on my machine. I am using the following installation URL: https://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora I am trying to get the bundle install command to work for me behind a proxy( I am currently at work, thus behind a proxy ). I have manually installed the gems( I had no choice on it; at that time), required for my app. I am facing the following error on this regard. mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle install Fetching source index for http://rubygems.org/ /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `initialize': not in gzip format (Zlib::GzipFile::Error) from /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `new' from /usr/local/lib/site_ruby/1.8/rubygems.rb:550:in `gunzip' from /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:177:in `fetch_path' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:270:in `load_specs' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:243:in `list' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:239:in `each' from /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:239:in `list' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:236:in `fetch_all_remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:217:in `remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:214:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:214:in `remote_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:154:in `fetch_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/index.rb:7:in `build' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:151:in `fetch_specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:66:in `specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:159:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:158:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:158:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/index.rb:7:in `build' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:157:in `index' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:151:in `resolve' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:90:in `specs' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/definition.rb:85:in `resolve_remotely!' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:35:in `run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/bin/bundle:13 from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19 mohnish@pc146724-desktop:~/Diaspora/diaspora$ I am not sure whats causing it and how to overcome it. I have a feeling that bundle is not able to detect the gems I have already installed. I also tried out the following command: bundle exec rake db:create. It says it could not find the gem , although I have already installed it. The error I get is given below: mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle exec rake db:create Could not find gem 'em-websocket (>= 0, runtime)' in any of the gem sources listed in your Gemfile. mohnish@pc146724-desktop:~/Diaspora/diaspora$ My gem list looks like this: mohnish@pc146724-desktop:~/Diaspora/diaspora$ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.3, 2.0.2) actionpack (3.0.3, 2.0.2) activemodel (3.0.3) activerecord (3.0.3, 2.0.2) activerecord-jdbcmysql-adapter (0.9.2) activeresource (3.0.3, 2.0.2) activesupport (3.0.3, 2.0.2) addressable (2.2.4, 2.2.2) arel (2.0.2) aws (2.3.32) bcrypt-ruby (2.1.4) builder (3.0.0, 2.1.2) bundler (1.0.10) bunny (0.6.0) calendar_date_select (1.11.1) capistrano (2.5.19) capistrano-ext (1.2.1) capybara (0.3.9) carrierwave (0.5.1) cgi_multipart_eof_fix (2.5.0) chef (0.9.12) childprocess (0.1.7) closure-compiler (1.0.0) cloudfiles (1.4.10) columnize (0.1) configuration (0.0.5) crack (0.1.7) cucumber (0.10.0) cucumber-rails (0.3.2) culerity (0.2.15) daemons (1.1.0) database_cleaner (0.6.0) devise (1.1.3) devise_invitable (0.3.5) diff-lcs (1.1.2) dispatcher (0.0.1) em-websocket (0.2.0) erubis (2.6.6) eventmachine (0.12.10, 0.12.6) excon (0.2.4) extlib (0.9.15) factory_girl (1.3.0) factory_girl_rails (1.0.1) faraday (0.5.5) faraday_middleware (0.3.2) fastercsv (1.5.4) fastthread (1.0.7) ffi (1.0.5, 0.6.3, 0.5.1) fixture_builder (0.2.0) fog (0.3.25) formatador (0.0.16) fuubar (0.0.3) gem_plugin (0.2.3) gherkin (2.3.3) googlecharts (1.6.1) haml (3.0.25) hashie (1.0.0) highline (1.6.1) hoe (2.8.0) http_accept_language (1.0.1) http_connection (1.4.0) i18n (0.4.0) jammit (0.5.4) jasmine (1.0.1.1) jdbc-mysql (5.1.13) json (1.4.6) json_pure (1.5.1) launchy (0.3.7) linecache (0.42) mail (2.2.15) mime-types (1.16) mini_magick (3.2) mixlib-authentication (1.1.4) mixlib-cli (1.2.0) mixlib-config (1.1.2) mixlib-log (1.2.0) mocha (0.9.12) moneta (0.6.0) mongrel (1.1.5) multi_json (0.0.5) multi_xml (0.2.1) multipart-post (1.1.0) mysql (2.8.1) mysql2 (0.2.6) net-ldap (0.1.1) net-scp (1.0.4) net-sftp (2.0.5) net-ssh (2.1.0, 2.0.23) net-ssh-gateway (1.0.1) nokogiri (1.4.4, 1.4.3.1) oa-basic (0.1.6) oa-core (0.1.6) oa-enterprise (0.1.6) oa-oauth (0.1.6) oa-openid (0.1.6) oauth (0.4.0) oauth2 (0.1.0) ohai (0.5.8) okkez-open_id_authentication (1.0.1) omniauth (0.1.6) polyglot (0.3.1) pyu-ruby-sasl (0.0.3.2) rack (1.2.1) rack-mount (0.6.13) rack-openid (1.2.0) rack-test (0.5.7) rails (3.0.3, 2.0.2) railties (3.0.3) rake (0.8.7) rake-compiler (0.7.5) redis (2.1.1) redis-namespace (0.10.0, 0.8.0) resque (1.10.0) rest-client (1.6.1) roxml (3.1.6) rspec (2.5.0) rspec-core (2.5.0) rspec-expectations (2.5.0) rspec-instafail (0.1.6) rspec-mocks (2.5.0) rspec-rails (2.5.0) ruby-debug (0.10.4) ruby-debug-base (0.10.4) ruby-hmac (0.4.0) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) ruby-progressbar (0.0.9) rubyntlm (0.1.1) rubyzip (0.9.4) sanitize (2.0.0) selenium-client (1.2.17, 1.2.16) selenium-rc (2.1.0) selenium-webdriver (0.1.2) simple_oauth (0.1.4) sinatra (0.9.2) sqlite3 (0.0.2) ssl_requirement (0.1.0) subexec (0.0.4) SystemTimer (1.2.1) systemu (1.2.0) term-ansicolor (1.0.5) thin (1.2.7) thor (0.14.4) treetop (1.4.9) twitter (1.1.2) tzinfo (0.3.23) uuidtools (2.1.2) vegas (0.1.2) warden (1.0.3, 0.10.7) weakling (0.0.3) webmock (1.6.2) whitelist (0.0.1) will_paginate (3.0.pre2, 2.2.0) xml-simple (1.0.14) yui-compressor (0.9.1) mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle show em-websocket (0.2.0) bash: syntax error near unexpected token `(' mohnish@pc146724-desktop:~/Diaspora/diaspora$ bundle show em-websocket Could not find gem 'em-websocket (>= 0, runtime)' in any of the gem sources listed in your Gemfile. mohnish@pc146724-desktop:~/Diaspora/diaspora$ Any suggestions, on how can I overcome these issues. I really could use any help.. Thank you..
0
10,858,475
06/01/2012 23:17:25
331,884
05/03/2010 23:23:04
312
6
knockoutjs template jquery autocomplete - how to populate inputs on autocomplete select?
I want to populate multiple inputs inside a template after select of an autocomplete item. I'm following http://jsfiddle.net/rniemeyer/MJQ6g/ but not sure how to apply this to multiple inputs. Model: <script> var ContactModel = function (contactsInfo) { var self = this; self.Company = ko.observable(); self.ContactsInformation = contactsInfo; self.Name = ko.observable(); }; var ContactsInformationModel = function () { var self = this; self.Address1 = ko.observable(); }; var viewModel; var ViewModel = function () { var self = this; self.Contact1 = new ContactModel(new ContactsInformation); self.Contact2 = new ContactModel(new ContactsInformation); }; $(function () { viewModel = new ViewModel(); ko.applyBindings(viewModel); }); function getContacts(searchTerm, sourceArray) { $.getJSON("web_service_uri" + searchTerm, function (data) { var mapped = $.map(data, function (item) { return { label: item.Name, value: item }; }); return sourceArray(mapped); }); } </script> Template: <script type="text/html" id="contact-template"> <div> Name <input data-bind="uniqueName: true, jqAuto: { autoFocus: true, html: true }, jqAutoSource: $root.Contacts, jqAutoQuery: getContacts, jqAutoValue: Name, jqAutoSourceLabel: 'label', jqAutoSourceInputValue: 'value', jqAutoSourceValue: 'label'" class="name" /> </div> <div> Company <input data-bind="value: Company, uniqueName: true" class="company" /> </div> <div> Address <input data-bind="value: ContactsInformation.Address1, uniqueName: true" class="address1" /> </div> </script> Html: <div data-bind="template: { name: 'contact-template', data: Contact1 }"> </div> <hr/> <div data-bind="template: { name: 'contact-template', data: Contact2 }"> </div>
jquery-ui
knockout.js
null
null
null
null
open
knockoutjs template jquery autocomplete - how to populate inputs on autocomplete select? === I want to populate multiple inputs inside a template after select of an autocomplete item. I'm following http://jsfiddle.net/rniemeyer/MJQ6g/ but not sure how to apply this to multiple inputs. Model: <script> var ContactModel = function (contactsInfo) { var self = this; self.Company = ko.observable(); self.ContactsInformation = contactsInfo; self.Name = ko.observable(); }; var ContactsInformationModel = function () { var self = this; self.Address1 = ko.observable(); }; var viewModel; var ViewModel = function () { var self = this; self.Contact1 = new ContactModel(new ContactsInformation); self.Contact2 = new ContactModel(new ContactsInformation); }; $(function () { viewModel = new ViewModel(); ko.applyBindings(viewModel); }); function getContacts(searchTerm, sourceArray) { $.getJSON("web_service_uri" + searchTerm, function (data) { var mapped = $.map(data, function (item) { return { label: item.Name, value: item }; }); return sourceArray(mapped); }); } </script> Template: <script type="text/html" id="contact-template"> <div> Name <input data-bind="uniqueName: true, jqAuto: { autoFocus: true, html: true }, jqAutoSource: $root.Contacts, jqAutoQuery: getContacts, jqAutoValue: Name, jqAutoSourceLabel: 'label', jqAutoSourceInputValue: 'value', jqAutoSourceValue: 'label'" class="name" /> </div> <div> Company <input data-bind="value: Company, uniqueName: true" class="company" /> </div> <div> Address <input data-bind="value: ContactsInformation.Address1, uniqueName: true" class="address1" /> </div> </script> Html: <div data-bind="template: { name: 'contact-template', data: Contact1 }"> </div> <hr/> <div data-bind="template: { name: 'contact-template', data: Contact2 }"> </div>
0
8,385,768
12/05/2011 13:05:43
223,367
12/02/2009 23:52:01
3,551
18
Why is the first vhost overwritting the other
I am setting up my vhost for the mac osx snow leopard and all looks great except this....Here are my two virtual hosts <VirtualHost *:80> ServerAdmin something@gmail.com ServerName localhost # ServerAlias DocumentRoot /Users/matt/Sites ErrorLog /var/log/apache2/error_log <Directory "/Users/matt/Sites"> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin something@gmail.com ServerName comfort.dev # ServerAlias DocumentRoot /Users/matt/Sites/CF ErrorLog /var/log/apache2/error_log <Directory "/Users/matt/Sites/CF"> Order allow,deny Allow from all </Directory> </VirtualHost> The problem is I want to have two named hosts that point to two locations but they always point to the first location `/Users/matt/Sites` If i flipped the order of the vhosts then both would point to the other location ....how do i get them to point to the seperate locations any ideas
osx
apache
httpd
httpd.conf
vhosts
12/06/2011 12:21:39
off topic
Why is the first vhost overwritting the other === I am setting up my vhost for the mac osx snow leopard and all looks great except this....Here are my two virtual hosts <VirtualHost *:80> ServerAdmin something@gmail.com ServerName localhost # ServerAlias DocumentRoot /Users/matt/Sites ErrorLog /var/log/apache2/error_log <Directory "/Users/matt/Sites"> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin something@gmail.com ServerName comfort.dev # ServerAlias DocumentRoot /Users/matt/Sites/CF ErrorLog /var/log/apache2/error_log <Directory "/Users/matt/Sites/CF"> Order allow,deny Allow from all </Directory> </VirtualHost> The problem is I want to have two named hosts that point to two locations but they always point to the first location `/Users/matt/Sites` If i flipped the order of the vhosts then both would point to the other location ....how do i get them to point to the seperate locations any ideas
2
4,598,296
01/04/2011 20:52:57
360,675
06/07/2010 17:39:03
8
0
HL7 Interface Engine Recommendations
I am doing some consulting work for a small pharmacy services provider that needs a HL7 interface engine setup for it to provide interfacing to products that run on the LAMP stack. More specifically what I am looking for is a HL7 engine that runs on *NIX and can insert data from a HL7 v2.X message into a MySQL database. The data that is inserted will be data taken out of arbitrary fields so it needs to do parsing. I tried using Mirth, but it's ability to make any seemingly simple task overly complex and the extreme slowness of it's client interface/response times has made us very gun shy on it. When I state a simple task I mean like sending back a custom ACK message based upon a few rules forces me to write 100 lines of javascript and after that still getting horrible response times. I loved Iguana and wanted to use it, but they quoted us between $12k and $15k for a single instance of it on a single server. It was a good piece of software but not THAT good to justify a price tag like that as well as that is well beyond what my customer is willing to pay for a single piece of software that drives a small part of their business. Does anybody have any recommendations for open source and/or proprietary software that will meet these needs? Thanks in advance!
hl7
mirth
healthcare
null
null
12/13/2011 10:14:06
not constructive
HL7 Interface Engine Recommendations === I am doing some consulting work for a small pharmacy services provider that needs a HL7 interface engine setup for it to provide interfacing to products that run on the LAMP stack. More specifically what I am looking for is a HL7 engine that runs on *NIX and can insert data from a HL7 v2.X message into a MySQL database. The data that is inserted will be data taken out of arbitrary fields so it needs to do parsing. I tried using Mirth, but it's ability to make any seemingly simple task overly complex and the extreme slowness of it's client interface/response times has made us very gun shy on it. When I state a simple task I mean like sending back a custom ACK message based upon a few rules forces me to write 100 lines of javascript and after that still getting horrible response times. I loved Iguana and wanted to use it, but they quoted us between $12k and $15k for a single instance of it on a single server. It was a good piece of software but not THAT good to justify a price tag like that as well as that is well beyond what my customer is willing to pay for a single piece of software that drives a small part of their business. Does anybody have any recommendations for open source and/or proprietary software that will meet these needs? Thanks in advance!
4
2,071,595
01/15/2010 13:03:54
1,458,933
10/24/2008 13:34:24
235
7
Generate a row in an aggregation query for a date with no results against it.
I'm sorry if the title question isn't very clear but i don't think i can expalain my problem in a single sentance. I have a table with a number of different types of events in it all recorded against a date. I'm querying the table and grouping based on a subset of the date (month and year). SELECT DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time), COUNT(reason) FROM blacklist_history WHERE (event_date_time BETWEEN DATEADD(mm,-6, '20/12/2009 23:59:59') AND '20/12/2009 23:59:59') GROUP BY (DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time)) ORDER BY CONVERT(DATETIME, DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time)) ASC (I normally have a variable for the date field) This query returns the following against my data: August 2009 15358 September 2009 48722 October 2009 19143 November 2009 4205 December 2009 3286 Now what i want to do is have the query also return for July 2009 but return a count of 0. I know that SQL Server can't just magic this out of thin air, but i can't quite see in my head how i would create the data i want to join against my result to fill the empty space for July. Any suggestions would be helpful.(using SQL Server 2005) Thanks
sql
sql-server
null
null
null
null
open
Generate a row in an aggregation query for a date with no results against it. === I'm sorry if the title question isn't very clear but i don't think i can expalain my problem in a single sentance. I have a table with a number of different types of events in it all recorded against a date. I'm querying the table and grouping based on a subset of the date (month and year). SELECT DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time), COUNT(reason) FROM blacklist_history WHERE (event_date_time BETWEEN DATEADD(mm,-6, '20/12/2009 23:59:59') AND '20/12/2009 23:59:59') GROUP BY (DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time)) ORDER BY CONVERT(DATETIME, DATENAME(MONTH, event_date_time) + ' ' + DATENAME(YEAR, event_date_time)) ASC (I normally have a variable for the date field) This query returns the following against my data: August 2009 15358 September 2009 48722 October 2009 19143 November 2009 4205 December 2009 3286 Now what i want to do is have the query also return for July 2009 but return a count of 0. I know that SQL Server can't just magic this out of thin air, but i can't quite see in my head how i would create the data i want to join against my result to fill the empty space for July. Any suggestions would be helpful.(using SQL Server 2005) Thanks
0
11,404,837
07/09/2012 23:49:13
1,513,337
07/09/2012 23:44:26
1
0
How Mule Standalone actually eorks?
I am new to Mule, and I am trying to understand the difference between the mule standalone vs embedded. I have read of topics regarding this but I was not able to answer one question. How the Mule standalone actually work? how it handles web services? does it have an application server's functionality? does it have an embedded or bundled app server?
mule
null
null
null
null
null
open
How Mule Standalone actually eorks? === I am new to Mule, and I am trying to understand the difference between the mule standalone vs embedded. I have read of topics regarding this but I was not able to answer one question. How the Mule standalone actually work? how it handles web services? does it have an application server's functionality? does it have an embedded or bundled app server?
0
3,327,451
07/25/2010 00:07:49
399,815
07/23/2010 02:09:39
207
16
Most interesting/useful Java classes?
I've been using Java for a year or so now, and I constantly find myself discovering new things in the language. Most of this cool stuff, interestingly enough, doesn't come from 3rd-party APIs or libraries, but rather from the classes that ship in the JDK. So I'm wondering, partly out of curiosity and partly for the education of others and myself, what classes that come in the JDK are the most interesting/useful/your favorite?
java
class
jdk
null
null
07/25/2010 04:51:42
not constructive
Most interesting/useful Java classes? === I've been using Java for a year or so now, and I constantly find myself discovering new things in the language. Most of this cool stuff, interestingly enough, doesn't come from 3rd-party APIs or libraries, but rather from the classes that ship in the JDK. So I'm wondering, partly out of curiosity and partly for the education of others and myself, what classes that come in the JDK are the most interesting/useful/your favorite?
4
1,843,119
12/03/2009 21:41:40
13,895
09/16/2008 21:13:57
2,079
157
Are there settings in Crystal Reports that modify sort order of data sources?
I'm working with Crystal Reports in VB.NET in Visual Studio 2005. I have a List(Of Stuff) that I've sorted according to one of the object's members. I've verified in the debugger that the list is sorted correctly. When I define my list as the data source, as in rptDetails.Subreports.Item("rptSubReport").SetDataSource(theListOfStuff) and view the report, the list is reversed. So, looking for a workaround, I said, "OK, I'll sort the list backwards before binding it." The list still appeared backwards in the report. So something's happening, and I think it's within the report definition, because I don't know where else the sort order could be changed. Any suggestions? Thanks as always.
crystal-reports
vb.net
visual-studio-2005
sorting
subreport
null
open
Are there settings in Crystal Reports that modify sort order of data sources? === I'm working with Crystal Reports in VB.NET in Visual Studio 2005. I have a List(Of Stuff) that I've sorted according to one of the object's members. I've verified in the debugger that the list is sorted correctly. When I define my list as the data source, as in rptDetails.Subreports.Item("rptSubReport").SetDataSource(theListOfStuff) and view the report, the list is reversed. So, looking for a workaround, I said, "OK, I'll sort the list backwards before binding it." The list still appeared backwards in the report. So something's happening, and I think it's within the report definition, because I don't know where else the sort order could be changed. Any suggestions? Thanks as always.
0
9,188,696
02/08/2012 06:21:25
302,064
03/25/2010 20:39:05
600
4
Can someone recommend books for learning how to develop Software Requirements Specifications for web development?
Currently I develop SRS documents for our web development projects but for some clients, more sophisticated ones with well structured IT and processes--these are not adequate or enterprise level. Are there books or websites out there that someone can recommend that will help me take this documentation to the next level so that they can be confident in the solutions that I am building for them?
architecture
documentation
specifications
srs
functional-specifications
02/08/2012 13:58:01
not constructive
Can someone recommend books for learning how to develop Software Requirements Specifications for web development? === Currently I develop SRS documents for our web development projects but for some clients, more sophisticated ones with well structured IT and processes--these are not adequate or enterprise level. Are there books or websites out there that someone can recommend that will help me take this documentation to the next level so that they can be confident in the solutions that I am building for them?
4
2,760,503
05/03/2010 19:05:24
35,335
11/07/2008 01:08:59
875
37
Ways of breaking down SQL transactional/call data into reports -- 'square data'?
I've got a large database of call-traffic information (although the question could be answered with any generic data set.) For instance, a row contains : call endpoint server (endpoint_name) call endpoint status (sip_disconnect_reason) call destination (destination) call completed (duration) [duration >0 is completed] call account group (account_group) It's pretty easy to run SQL reports against the data, i.e. select count(*), endpoint_name from calls where duration>0 group by endpoint_name select count(*),destination from calls where blah group by destination I've been calling this filtering or breakdown reports (I get the number of calls per carrier, etc.). Add another breakdown, and you've got two breakdowns, a la select count(*), endpoint_name, sip_disconnect_reason from calls where duration=0 group by endpoint_name, sip_disconnect_reason Of course, if you keep adding breakdowns, you end up making super-large reports and slicing your data so thin that you can't extract any trends from it. So my question is this : Is there a name for this sort of method of report writing? (I've heard words like squares, slicing and breakdown reports applied to them) --- I'm looking for a Python/Reporting toolkit that I can use to make these easier to generate for my end users. aside : Are there other ways of representing transactional data that might be useful rather than the above method? Thanks,
reporting
reporting-services
voip
python
null
null
open
Ways of breaking down SQL transactional/call data into reports -- 'square data'? === I've got a large database of call-traffic information (although the question could be answered with any generic data set.) For instance, a row contains : call endpoint server (endpoint_name) call endpoint status (sip_disconnect_reason) call destination (destination) call completed (duration) [duration >0 is completed] call account group (account_group) It's pretty easy to run SQL reports against the data, i.e. select count(*), endpoint_name from calls where duration>0 group by endpoint_name select count(*),destination from calls where blah group by destination I've been calling this filtering or breakdown reports (I get the number of calls per carrier, etc.). Add another breakdown, and you've got two breakdowns, a la select count(*), endpoint_name, sip_disconnect_reason from calls where duration=0 group by endpoint_name, sip_disconnect_reason Of course, if you keep adding breakdowns, you end up making super-large reports and slicing your data so thin that you can't extract any trends from it. So my question is this : Is there a name for this sort of method of report writing? (I've heard words like squares, slicing and breakdown reports applied to them) --- I'm looking for a Python/Reporting toolkit that I can use to make these easier to generate for my end users. aside : Are there other ways of representing transactional data that might be useful rather than the above method? Thanks,
0
3,912,849
10/12/2010 08:39:15
353,674
05/29/2010 16:42:56
46
3
Implement page curl on android?
I was surfing the net looking for a nice effect for turning pages on Android and there just doesn't seem to be one. Since I'm learning the platform it seemed like a nice thing to be able to do is this. I managed to find a page here: http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html - (void)deform { Vertex2f vi; // Current input vertex Vertex3f v1; // First stage of the deformation Vertex3f *vo; // Pointer to the finished vertex CGFloat R, r, beta; for (ushort ii = 0; ii < numVertices_; ii++) { // Get the current input vertex. vi = inputMesh_[ii]; // Radius of the circle circumscribed by vertex (vi.x, vi.y) around A on the x-y plane R = sqrt(vi.x * vi.x + pow(vi.y - A, 2)); // Now get the radius of the cone cross section intersected by our vertex in 3D space. r = R * sin(theta); // Angle subtended by arc |ST| on the cone cross section. beta = asin(vi.x / R) / sin(theta); // *** MAGIC!!! *** v1.x = r * sin(beta); v1.y = R + A - r * (1 - cos(beta)) * sin(theta); v1.z = r * (1 - cos(beta)) * cos(theta); // Apply a basic rotation transform around the y axis to rotate the curled page. // These two steps could be combined through simple substitution, but are left // separate to keep the math simple for debugging and illustrative purposes. vo = &outputMesh_[ii]; vo->x = (v1.x * cos(rho) - v1.z * sin(rho)); vo->y = v1.y; vo->z = (v1.x * sin(rho) + v1.z * cos(rho)); } } that gives an example (above) code for iPhone but I have no idea how I would go about implementing this on android. Could any of the Math gods out there please help me out with how I would go about implementing this in Android Java. Is it possible using the native draw APIs, would I have to use openGL? Could I mimik the behaviour somehow? Any help would be appreciated. Thanks.
iphone
android
math
transition
null
null
open
Implement page curl on android? === I was surfing the net looking for a nice effect for turning pages on Android and there just doesn't seem to be one. Since I'm learning the platform it seemed like a nice thing to be able to do is this. I managed to find a page here: http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html - (void)deform { Vertex2f vi; // Current input vertex Vertex3f v1; // First stage of the deformation Vertex3f *vo; // Pointer to the finished vertex CGFloat R, r, beta; for (ushort ii = 0; ii < numVertices_; ii++) { // Get the current input vertex. vi = inputMesh_[ii]; // Radius of the circle circumscribed by vertex (vi.x, vi.y) around A on the x-y plane R = sqrt(vi.x * vi.x + pow(vi.y - A, 2)); // Now get the radius of the cone cross section intersected by our vertex in 3D space. r = R * sin(theta); // Angle subtended by arc |ST| on the cone cross section. beta = asin(vi.x / R) / sin(theta); // *** MAGIC!!! *** v1.x = r * sin(beta); v1.y = R + A - r * (1 - cos(beta)) * sin(theta); v1.z = r * (1 - cos(beta)) * cos(theta); // Apply a basic rotation transform around the y axis to rotate the curled page. // These two steps could be combined through simple substitution, but are left // separate to keep the math simple for debugging and illustrative purposes. vo = &outputMesh_[ii]; vo->x = (v1.x * cos(rho) - v1.z * sin(rho)); vo->y = v1.y; vo->z = (v1.x * sin(rho) + v1.z * cos(rho)); } } that gives an example (above) code for iPhone but I have no idea how I would go about implementing this on android. Could any of the Math gods out there please help me out with how I would go about implementing this in Android Java. Is it possible using the native draw APIs, would I have to use openGL? Could I mimik the behaviour somehow? Any help would be appreciated. Thanks.
0
2,100,449
01/20/2010 10:03:27
146,857
07/29/2009 06:11:50
2,153
144
RememberMe option in an asp.net web application
Hai guys, - what are the possible ways of implementing remember me option in an asp.net web application? ![alt text][1] [1]: http://www.freeimagehosting.net/uploads/0f9ebba1bb.jpg
asp.net
web-applications
remember-me
null
null
null
open
RememberMe option in an asp.net web application === Hai guys, - what are the possible ways of implementing remember me option in an asp.net web application? ![alt text][1] [1]: http://www.freeimagehosting.net/uploads/0f9ebba1bb.jpg
0
6,310,572
06/10/2011 18:29:47
552,812
12/23/2010 21:13:09
16
0
Messed Up Divs/CSS in IE8
Hello helpful stackers, This has been bugging me for the past week and because the system delays updates done in the backend up to 15 minutes before pushing them live it has been nothing but frustrating. On IE8 the layout gets broken pushing down the page a considerable amount. Here's the url: http://bit.ly/lIrBEn Greatly appreciate any input or direction! Thank you again.
php
css
layout
div
null
06/11/2011 14:31:02
too localized
Messed Up Divs/CSS in IE8 === Hello helpful stackers, This has been bugging me for the past week and because the system delays updates done in the backend up to 15 minutes before pushing them live it has been nothing but frustrating. On IE8 the layout gets broken pushing down the page a considerable amount. Here's the url: http://bit.ly/lIrBEn Greatly appreciate any input or direction! Thank you again.
3
6,614,375
07/07/2011 17:07:12
682,869
03/29/2011 21:04:12
164
1
C# why code compiles without any name spaces included
I tried the following // no using statements here, not even using System; class Program { static void Main(string[] args) { string[] arr = new string[3] { "A" , "B", "C" }; } } My question is simple, even without any using statements, how come compiler is able to compile this, more specifically, shouldn't there be a compile time error because I am trying to build an array and System.Array is not accessible? Thanks.
c#
null
null
null
null
null
open
C# why code compiles without any name spaces included === I tried the following // no using statements here, not even using System; class Program { static void Main(string[] args) { string[] arr = new string[3] { "A" , "B", "C" }; } } My question is simple, even without any using statements, how come compiler is able to compile this, more specifically, shouldn't there be a compile time error because I am trying to build an array and System.Array is not accessible? Thanks.
0
9,139,847
02/04/2012 09:32:59
245,304
01/07/2010 06:12:02
3
0
setpixel of QGraphicsScene in Qt
It's simple to draw line or ellipse just by using scene.addellipse(), etc. QGraphicsScene scene(0,0,800,600); QGraphicsView view(&scene); scene.addText("Hello, world!"); QPen pen(Qt::green); scene.addLine(0,0,200,200,pen); scene.addEllipse(400,300,100,100,pen); view.show(); now what should i do to set some pixel color? may i use a widget like qimage? by the way performance is an issue for me.thanks
qt
pixel
qgraphicsview
qgraphicsscene
null
null
open
setpixel of QGraphicsScene in Qt === It's simple to draw line or ellipse just by using scene.addellipse(), etc. QGraphicsScene scene(0,0,800,600); QGraphicsView view(&scene); scene.addText("Hello, world!"); QPen pen(Qt::green); scene.addLine(0,0,200,200,pen); scene.addEllipse(400,300,100,100,pen); view.show(); now what should i do to set some pixel color? may i use a widget like qimage? by the way performance is an issue for me.thanks
0
3,448,791
08/10/2010 12:16:02
416,123
08/10/2010 12:14:25
1
0
knowledge management tool
can anyone please give me some knowledge management tools
knowledge-management
null
null
null
null
08/10/2010 14:19:24
not a real question
knowledge management tool === can anyone please give me some knowledge management tools
1
10,633,481
05/17/2012 09:58:50
1,232,024
02/25/2012 03:06:09
1
0
Split text on page
How to split text between pages? Would like to know how to do HTML with the conclusion in the WebView or TextView, possibly even with images.
java
android
null
null
null
05/17/2012 16:23:43
not a real question
Split text on page === How to split text between pages? Would like to know how to do HTML with the conclusion in the WebView or TextView, possibly even with images.
1
9,693,430
03/13/2012 22:51:52
1,267,667
03/13/2012 22:31:24
1
0
How to add image and change visibility on hover CSS
I'm trying to do something semi complicated. I have 4 linked images. when I hover over the image I want the opacity to change to 0.7. I also want a ribbon to become visible when you hover that image. Here's the code I'm using <div id="tracks-content"> <div class="track enrolled"> <a href=""><div class="ribbon"><img src="ribbon.png"/></div> <span><img src="images/pic-track1.png" /></span></a> <h3>Track title 1</h3> <span>Track description here. Lorem ipsum dolor sit amet con sectetuer adipiscing elit.</span> </div> <div class="track unavailable"> <a href=""><div class="ribbon"><img src="ribbon.png"/></div> <span><img src="images/pic-track2.png" /></span></a> <h3>Track title 2</h3> <span>Track description here. Lorem ipsum dolor sit amet con sectetuer adipiscing elit.</span> </div> </div> So if I hover over the image for say track1.png then I want track1.png to dim to 70% and I want the visibility for ribbon.png to change from hidden to visible. I keep running into a problem where the opacity of the image is also applied to the ribbon. In the image you can see when I hover the 1st image the ribbon appears but is also getting the opacity. see link for image http://img.photobucket.com/albums/v513/Tearyguitarist/example.png Here's the css i'm using #tracks-content .enrolled a:hover > .ribbon{ visiblity:visible; } #tracks-content .enrolled a:hover span img{ outline: solid 1px #40a304; opacity:0.5; } Any suggestions? I can't use any position absolutes since the whole page is php driven and could have 1 or 10 tracks so the content has to be dynamic and reuseable.
html
css
hover
visibility
opacity
null
open
How to add image and change visibility on hover CSS === I'm trying to do something semi complicated. I have 4 linked images. when I hover over the image I want the opacity to change to 0.7. I also want a ribbon to become visible when you hover that image. Here's the code I'm using <div id="tracks-content"> <div class="track enrolled"> <a href=""><div class="ribbon"><img src="ribbon.png"/></div> <span><img src="images/pic-track1.png" /></span></a> <h3>Track title 1</h3> <span>Track description here. Lorem ipsum dolor sit amet con sectetuer adipiscing elit.</span> </div> <div class="track unavailable"> <a href=""><div class="ribbon"><img src="ribbon.png"/></div> <span><img src="images/pic-track2.png" /></span></a> <h3>Track title 2</h3> <span>Track description here. Lorem ipsum dolor sit amet con sectetuer adipiscing elit.</span> </div> </div> So if I hover over the image for say track1.png then I want track1.png to dim to 70% and I want the visibility for ribbon.png to change from hidden to visible. I keep running into a problem where the opacity of the image is also applied to the ribbon. In the image you can see when I hover the 1st image the ribbon appears but is also getting the opacity. see link for image http://img.photobucket.com/albums/v513/Tearyguitarist/example.png Here's the css i'm using #tracks-content .enrolled a:hover > .ribbon{ visiblity:visible; } #tracks-content .enrolled a:hover span img{ outline: solid 1px #40a304; opacity:0.5; } Any suggestions? I can't use any position absolutes since the whole page is php driven and could have 1 or 10 tracks so the content has to be dynamic and reuseable.
0
5,513,927
04/01/2011 13:18:36
683,783
03/30/2011 11:02:02
6
0
PHP = > if (mail) + timeout?
I have a simplistic webform running on bluehost that when submitted, sends out mail to a distribution list. Recently the mail server went down, and my php mail script hung when the submit button was clicked. The user tried one more time, and again the page just hung. Later when the mail server came back up, it sent out multiple copies of the mail. My question is, is there an easy way to put some sort of timeout on the script, so that if either a set period of time passes and the mail server has not acknowledged the request, or alternatively, if the number of unsuccessful attempts has exceeded a preset number, then the script will stop attempting to send the mail? My script: // try to send email if (mail($to,$subject,$msg,$headers)) { header('Location: complete.php'); } else { header('Location: incomplete.php'); } Thanks for any advice you may be able to give, Rich. PS. I do not have access to change any settings on the server, although I do have a .htaccess file saved to the local directory.
php
email
null
null
null
null
open
PHP = > if (mail) + timeout? === I have a simplistic webform running on bluehost that when submitted, sends out mail to a distribution list. Recently the mail server went down, and my php mail script hung when the submit button was clicked. The user tried one more time, and again the page just hung. Later when the mail server came back up, it sent out multiple copies of the mail. My question is, is there an easy way to put some sort of timeout on the script, so that if either a set period of time passes and the mail server has not acknowledged the request, or alternatively, if the number of unsuccessful attempts has exceeded a preset number, then the script will stop attempting to send the mail? My script: // try to send email if (mail($to,$subject,$msg,$headers)) { header('Location: complete.php'); } else { header('Location: incomplete.php'); } Thanks for any advice you may be able to give, Rich. PS. I do not have access to change any settings on the server, although I do have a .htaccess file saved to the local directory.
0
244,503
10/28/2008 19:24:23
10,973
09/16/2008 03:36:05
601
57
Preserve mapped drive letter information during UAC elevation
We have an application that needs to know the path that it is executed from (which is always a network path). We set up part of our configuration based on the path that the application is launched from, and we really want that configuration to use mapped network drive paths instead of the UNC path to the resource. What we've found is that when we launch our application without UAC elevation, we are able to get the directory that the application launched from using GetModuleFileName(NULL, buf, sizeof(buf)); But when we launch elevated (which we actually need to do), the buffer returned gives us a UNC based path instead of a drive letter based path. Note that we always launch from Windows Explorer by navigating into the folder tree of the mapped drive letter. Does anyone have any suggestions on how to get the drive letter based path of the EXE from a process that is running elevated?
windows-vista
uac
unc
null
null
null
open
Preserve mapped drive letter information during UAC elevation === We have an application that needs to know the path that it is executed from (which is always a network path). We set up part of our configuration based on the path that the application is launched from, and we really want that configuration to use mapped network drive paths instead of the UNC path to the resource. What we've found is that when we launch our application without UAC elevation, we are able to get the directory that the application launched from using GetModuleFileName(NULL, buf, sizeof(buf)); But when we launch elevated (which we actually need to do), the buffer returned gives us a UNC based path instead of a drive letter based path. Note that we always launch from Windows Explorer by navigating into the folder tree of the mapped drive letter. Does anyone have any suggestions on how to get the drive letter based path of the EXE from a process that is running elevated?
0
4,267,001
11/24/2010 12:53:50
518,807
11/24/2010 12:53:50
1
0
how the system knows weather we are uploading a csv fie or a xls file?
i hope you doing well. i am new to uploading a file to database.i have few doubts,as follows. i wants to know the process how the system will identify the file in uploading weather it is a csv file or a xml file? what is the difference between csv file and xls file?benefits and drawbacks of each? in my application it is configured with csv file upload but i am testing it for a xml file upload .then it is raising an error as "string literal too long".can you explain how to resolve this problem? i am waiting for your responce. thanks & regards Ponnam Ramulu
java
null
null
null
null
11/24/2010 14:20:26
not a real question
how the system knows weather we are uploading a csv fie or a xls file? === i hope you doing well. i am new to uploading a file to database.i have few doubts,as follows. i wants to know the process how the system will identify the file in uploading weather it is a csv file or a xml file? what is the difference between csv file and xls file?benefits and drawbacks of each? in my application it is configured with csv file upload but i am testing it for a xml file upload .then it is raising an error as "string literal too long".can you explain how to resolve this problem? i am waiting for your responce. thanks & regards Ponnam Ramulu
1
6,511,224
06/28/2011 18:18:23
818,479
06/28/2011 04:12:32
-1
0
How to update controls from another thread?
I have a simple wpf app. I need to update controls from another thread. This is my code namespace WpfApplication1 { class Stock { public int StockId { get; set; } public string Name { get; set; } } class ThreadManager { public AddMoscowItem MoscowDelegate { get; set; } public AddLondonItem LondonDelegate { get; set; } public AddNewYorkItem NyDelegate { get; set; } public ThreadManager() { InitStocks(); } private static readonly object lockObject = new object(); private Stock[] stocks; public ThreadManager(AddMoscowItem moscowDelegate, AddLondonItem londonDelegate, AddNewYorkItem nyDelegate) { MoscowDelegate = moscowDelegate; LondonDelegate = londonDelegate; NyDelegate = nyDelegate; } private void InitStocks() { if (stocks == null) lock (lockObject) { if (stocks == null) stocks = new Stock[] { new Stock() {Name = "Moscow", StockId = 1}, new Stock() {Name = "London", StockId = 2}, new Stock() {Name = "NY", StockId = 3} }; } } public void RunStocks() { //here we must call methods: AddMoscowListBoxItem, AddLondonListBoxItem //how to do it linking to corresponding stock? } } public delegate void AddMoscowItem(string msg); public delegate void AddLondonItem(string msg); public delegate void AddNewYorkItem(string msg); /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { private AddMoscowItem moscowDelegate; private AddLondonItem londonDelegate; private AddNewYorkItem nyDelegate; public MainWindow() { InitializeComponent(); moscowDelegate = AddMoscowListBoxItem; londonDelegate = AddLondonListBoxItem; nyDelegate = AddNYListBoxItem; RunThreads(); } public void RunThreads() { ThreadManager stockThreads = new ThreadManager(moscowDelegate, londonDelegate, nyDelegate); stockThreads.RunStocks(); } private void Window_Loaded(object sender, RoutedEventArgs e) { } public void AddMoscowListBoxItem(string msg) { if (this.lbxMoscow.Dispatcher.Thread == Thread.CurrentThread) { lbxMoscow.Items.Add(msg); } else { lbxMoscow.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxMoscow.Items.Add(msg); return null; }), null); } } public void AddLondonListBoxItem(string msg) { if (this.lbxLondon.Dispatcher.Thread == Thread.CurrentThread) { lbxLondon.Items.Add(msg); } else { lbxLondon.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxLondon.Items.Add(msg); return null; }), null); } } public void AddNYListBoxItem(string msg) { if (this.lbxNY.Dispatcher.Thread == Thread.CurrentThread) { lbxNY.Items.Add(msg); } else { lbxNY.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxNY.Items.Add(msg); return null; }), null); } } } } Any advices are appropriate!
wpf
null
null
null
null
06/28/2011 19:53:26
not a real question
How to update controls from another thread? === I have a simple wpf app. I need to update controls from another thread. This is my code namespace WpfApplication1 { class Stock { public int StockId { get; set; } public string Name { get; set; } } class ThreadManager { public AddMoscowItem MoscowDelegate { get; set; } public AddLondonItem LondonDelegate { get; set; } public AddNewYorkItem NyDelegate { get; set; } public ThreadManager() { InitStocks(); } private static readonly object lockObject = new object(); private Stock[] stocks; public ThreadManager(AddMoscowItem moscowDelegate, AddLondonItem londonDelegate, AddNewYorkItem nyDelegate) { MoscowDelegate = moscowDelegate; LondonDelegate = londonDelegate; NyDelegate = nyDelegate; } private void InitStocks() { if (stocks == null) lock (lockObject) { if (stocks == null) stocks = new Stock[] { new Stock() {Name = "Moscow", StockId = 1}, new Stock() {Name = "London", StockId = 2}, new Stock() {Name = "NY", StockId = 3} }; } } public void RunStocks() { //here we must call methods: AddMoscowListBoxItem, AddLondonListBoxItem //how to do it linking to corresponding stock? } } public delegate void AddMoscowItem(string msg); public delegate void AddLondonItem(string msg); public delegate void AddNewYorkItem(string msg); /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { private AddMoscowItem moscowDelegate; private AddLondonItem londonDelegate; private AddNewYorkItem nyDelegate; public MainWindow() { InitializeComponent(); moscowDelegate = AddMoscowListBoxItem; londonDelegate = AddLondonListBoxItem; nyDelegate = AddNYListBoxItem; RunThreads(); } public void RunThreads() { ThreadManager stockThreads = new ThreadManager(moscowDelegate, londonDelegate, nyDelegate); stockThreads.RunStocks(); } private void Window_Loaded(object sender, RoutedEventArgs e) { } public void AddMoscowListBoxItem(string msg) { if (this.lbxMoscow.Dispatcher.Thread == Thread.CurrentThread) { lbxMoscow.Items.Add(msg); } else { lbxMoscow.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxMoscow.Items.Add(msg); return null; }), null); } } public void AddLondonListBoxItem(string msg) { if (this.lbxLondon.Dispatcher.Thread == Thread.CurrentThread) { lbxLondon.Items.Add(msg); } else { lbxLondon.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxLondon.Items.Add(msg); return null; }), null); } } public void AddNYListBoxItem(string msg) { if (this.lbxNY.Dispatcher.Thread == Thread.CurrentThread) { lbxNY.Items.Add(msg); } else { lbxNY.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback( delegate { lbxNY.Items.Add(msg); return null; }), null); } } } } Any advices are appropriate!
1
11,431,167
07/11/2012 10:57:53
1,517,519
07/11/2012 10:51:19
1
0
Any php cms similar like dotnetnuke?
Have anyone came a cross a cms that similar like [1]: http://www.dotnetnuke.com/ but in php version? which allow user to edit the web site content with gui exactly the same like the front end ? Thanks.
php
content-management-system
null
null
null
07/12/2012 02:37:20
not constructive
Any php cms similar like dotnetnuke? === Have anyone came a cross a cms that similar like [1]: http://www.dotnetnuke.com/ but in php version? which allow user to edit the web site content with gui exactly the same like the front end ? Thanks.
4
5,388,087
03/22/2011 07:34:02
640,817
03/02/2011 08:30:03
5
0
How to marge to images ?
I want to Marge two different images. Is there some library to do it ? ( .net platform or in unmanaged code ( C++ ) )
image
null
null
null
null
null
open
How to marge to images ? === I want to Marge two different images. Is there some library to do it ? ( .net platform or in unmanaged code ( C++ ) )
0
5,882,585
05/04/2011 11:24:43
504,478
11/11/2010 12:12:29
16
0
Django Model Formsets and named urls
I'm having some problems with model formsets in django. # forms.py OppFormSet = modelformset_factory(Opportunity, fields=opp_fields) # views.py def index2(request): queryset = Opportunity.objects.for_user(request.user).filter(is_deleted=False) if request.method == 'POST': formset = OppFormSet(request.POST, queryset=queryset) else: formset = OppFormSet(queryset=queryset) return render_to_response("opp_index2.tmpl", { "formset" : formset}, context_instance=RequestContext(request)) Here are my 2 questions regarding model forms: 1. In my template I have {% for form in formset %} to create the forms in a table, but somehow, I keep getting an extra blank row, as if there is an additional blank form in the formset. 2. If i use {{ form.instance.id }} to output an id while iterating through the formset, it prints out ok. However, if I do a {% url summary form.instance.id %} I keep getting an error regarding no NoReverseMatch with arguments (None,). It seems like when using form.instance.id in a template tag, it doesn't work. Is that true? If so, how do i circumvent it? Thank you in advance.
python
django
django-forms
null
null
null
open
Django Model Formsets and named urls === I'm having some problems with model formsets in django. # forms.py OppFormSet = modelformset_factory(Opportunity, fields=opp_fields) # views.py def index2(request): queryset = Opportunity.objects.for_user(request.user).filter(is_deleted=False) if request.method == 'POST': formset = OppFormSet(request.POST, queryset=queryset) else: formset = OppFormSet(queryset=queryset) return render_to_response("opp_index2.tmpl", { "formset" : formset}, context_instance=RequestContext(request)) Here are my 2 questions regarding model forms: 1. In my template I have {% for form in formset %} to create the forms in a table, but somehow, I keep getting an extra blank row, as if there is an additional blank form in the formset. 2. If i use {{ form.instance.id }} to output an id while iterating through the formset, it prints out ok. However, if I do a {% url summary form.instance.id %} I keep getting an error regarding no NoReverseMatch with arguments (None,). It seems like when using form.instance.id in a template tag, it doesn't work. Is that true? If so, how do i circumvent it? Thank you in advance.
0
5,154,587
03/01/2011 12:35:30
610,921
02/10/2011 06:32:43
8
0
Generic android app
How can i write a generic app which is data driven. The app should take any data and render it. Up to what extent is this possible?? Thanx..
android
null
null
null
null
03/01/2011 13:20:59
not a real question
Generic android app === How can i write a generic app which is data driven. The app should take any data and render it. Up to what extent is this possible?? Thanx..
1
8,587,426
12/21/2011 09:16:55
807,665
06/21/2011 02:21:43
6
0
Can't install drivers in Windows XP Embedded system
I recently created a windows XP Embedded image of my target machine. When I installed that image on the target machine, the installation itself succeeded but I noticed some wierdness in the system. The drivers from the Intel driver cd(audio,video,LAN,chipset) had to be somehow installed again. When I tried running the Intel drivers cd, first of all the autorun did not start. Also running the setups individually for each also failed with some wierd errors. I then tried installing Visual Studio as some dlls from the SKDs installed along with Visual Studio were needed for a dll which I had written. The disk for Visual Studio did not work at all. Infact it showed only a readme.txt file when I opened the cd to search for a setup file. Am I missing some components which are needed for these installations to succeed? I already have the "Windows Installer Service" component added as well as "WMI Windows Installer provider". I also added all the "Class Installer - ..." components and all the "CoDevice Installer - ..." components. But still the above installations don't work. I installed the software for the touchscreen, that went well luckily. What am I doing wrong? Is there any other component needed for installers to work properly?
windows
windows-xp
embedded
null
null
12/22/2011 07:06:13
off topic
Can't install drivers in Windows XP Embedded system === I recently created a windows XP Embedded image of my target machine. When I installed that image on the target machine, the installation itself succeeded but I noticed some wierdness in the system. The drivers from the Intel driver cd(audio,video,LAN,chipset) had to be somehow installed again. When I tried running the Intel drivers cd, first of all the autorun did not start. Also running the setups individually for each also failed with some wierd errors. I then tried installing Visual Studio as some dlls from the SKDs installed along with Visual Studio were needed for a dll which I had written. The disk for Visual Studio did not work at all. Infact it showed only a readme.txt file when I opened the cd to search for a setup file. Am I missing some components which are needed for these installations to succeed? I already have the "Windows Installer Service" component added as well as "WMI Windows Installer provider". I also added all the "Class Installer - ..." components and all the "CoDevice Installer - ..." components. But still the above installations don't work. I installed the software for the touchscreen, that went well luckily. What am I doing wrong? Is there any other component needed for installers to work properly?
2
5,369,997
03/20/2011 17:04:32
82,099
03/24/2009 16:18:12
312
4
HttpHandler for a specific port
I have a web application built on ASP.NET MVC framework which requires a service payment module. For the given service payment provider, I have to create a module that listens to a specific port (different from 80) at a specific url. What is the best way to achieve this? Should I create a separate Http Server application which would listen to those connections? Is there a way to create an HttpHandler in the context of the main web application that would process the request for a given port?
asp.net
null
null
null
null
null
open
HttpHandler for a specific port === I have a web application built on ASP.NET MVC framework which requires a service payment module. For the given service payment provider, I have to create a module that listens to a specific port (different from 80) at a specific url. What is the best way to achieve this? Should I create a separate Http Server application which would listen to those connections? Is there a way to create an HttpHandler in the context of the main web application that would process the request for a given port?
0
5,546,783
04/05/2011 03:13:17
550,964
12/22/2010 08:32:39
1
1
Easy Ruby http/curl API to program with
I've been using Ruby for quite some time now, however unlike PHP, as far as I know there is not a standard http/Curl (fetching, processing forms) like library that is easy and powerful like PHP's libCuRL binding. While Net::HTTP is part of the Ruby standard library, I always find that API hard to remember and program with. Can anyone give suggestions on which http/curl library I should use over Net:HTTP ? Thanks -Tony
ruby
http
curl
null
null
null
open
Easy Ruby http/curl API to program with === I've been using Ruby for quite some time now, however unlike PHP, as far as I know there is not a standard http/Curl (fetching, processing forms) like library that is easy and powerful like PHP's libCuRL binding. While Net::HTTP is part of the Ruby standard library, I always find that API hard to remember and program with. Can anyone give suggestions on which http/curl library I should use over Net:HTTP ? Thanks -Tony
0
4,898,255
02/04/2011 13:02:50
395,640
07/19/2010 08:52:17
30
3
Setting Default document for subdomain
My website has a default document pointing to Home.aspx. The site has a folder which is mapped to a sub domain. Is it possible to map the subdomain to the subfolder and have a different default document. Does 301 redirect affect SEO.
c#
seo
subdomain
domain-mapping
null
02/05/2011 10:56:36
off topic
Setting Default document for subdomain === My website has a default document pointing to Home.aspx. The site has a folder which is mapped to a sub domain. Is it possible to map the subdomain to the subfolder and have a different default document. Does 301 redirect affect SEO.
2
9,064,819
01/30/2012 13:45:57
80,858
03/21/2009 13:04:10
945
45
silverlight: is it worth?
I'm considering doing a very interactive part on my web site related to maps and animations in Silverlight. Another option is flash or ajax which won't look that nice at all. My question is should I even try? Few years back SL wasn't available on most computers.
silverlight
null
null
null
null
02/01/2012 08:23:49
not constructive
silverlight: is it worth? === I'm considering doing a very interactive part on my web site related to maps and animations in Silverlight. Another option is flash or ajax which won't look that nice at all. My question is should I even try? Few years back SL wasn't available on most computers.
4
10,487,109
05/07/2012 18:26:02
1,004,902
10/20/2011 09:37:16
30
2
What are the main recognizable characteristics of a person through open source systems?
I have seen multiple types of Facial recognition systems that are able to recognize the following details of a person: Genre, size of the eyes, name of the person (through databases). Are there any open source systems (any programming language) to recognize for example baldness, if the person uses glasses or not, weight(full body picture), height and other details? Thank you, João Garcia.
open-source
artificial-intelligence
pattern-recognition
null
null
05/07/2012 23:50:01
off topic
What are the main recognizable characteristics of a person through open source systems? === I have seen multiple types of Facial recognition systems that are able to recognize the following details of a person: Genre, size of the eyes, name of the person (through databases). Are there any open source systems (any programming language) to recognize for example baldness, if the person uses glasses or not, weight(full body picture), height and other details? Thank you, João Garcia.
2
1,332,009
08/26/2009 02:04:05
92,735
04/19/2009 11:47:26
730
5
Would WCF client work over USB in compact framework?
Would WCF work through normal USB connection or does it require WIFI when using the Mobile Device as a WCF client to a WCF service running on the PC? Thanks
wcf
usb
compact-framework
null
null
null
open
Would WCF client work over USB in compact framework? === Would WCF work through normal USB connection or does it require WIFI when using the Mobile Device as a WCF client to a WCF service running on the PC? Thanks
0
5,147,813
02/28/2011 21:32:55
493,920
11/01/2010 18:29:04
45
9
application doesn't work on macos server
I was try to run my working application on macos server, but application show error - can't open programm bcs it's doesn't support this type of mac computer. Any suggest? probably i have to change something in target?
cocoa
null
null
null
null
null
open
application doesn't work on macos server === I was try to run my working application on macos server, but application show error - can't open programm bcs it's doesn't support this type of mac computer. Any suggest? probably i have to change something in target?
0
11,469,203
07/13/2012 11:02:55
1,509,260
07/07/2012 20:52:33
32
0
Combining Porter-Duff and Blend Mode operations
I have implemented many blend modes such as Screen, Color Dodge, Color Burn, etc. Can someone share experience, how do you combine now blend modes with Porter-Duff operations? I know there is one formula for doing this, but I am interested how you implemented that, the general design. Thanks
image-processing
graphics
computer-vision
photoshop
null
07/17/2012 11:45:42
not a real question
Combining Porter-Duff and Blend Mode operations === I have implemented many blend modes such as Screen, Color Dodge, Color Burn, etc. Can someone share experience, how do you combine now blend modes with Porter-Duff operations? I know there is one formula for doing this, but I am interested how you implemented that, the general design. Thanks
1
10,893,946
06/05/2012 08:26:58
1,136,709
01/08/2012 04:10:01
312
9
What is the difference between a directory and a file with no extension?
On nearly all types of computers (if not all), folders have no extension. So I was wondering, what is the difference between a directory and a file with no extension? Don't they have the same name? Lucas
file
operating-system
extension
directory
null
06/05/2012 09:09:37
off topic
What is the difference between a directory and a file with no extension? === On nearly all types of computers (if not all), folders have no extension. So I was wondering, what is the difference between a directory and a file with no extension? Don't they have the same name? Lucas
2
4,492,906
12/20/2010 19:03:56
548,744
12/20/2010 14:28:13
1
0
Rails, collection_select - remembering values with :selected after form submitted
(Using Rails 2.3.5 on an internal work server with no choice of versions, and I'm pretty new) I'm building a search form where I need to provide a list of directories to a user so they can select which one(s) to search against. I'm trying to figure out how to get the selected values of a collection_select to remain after the form is submitted. Say the user selected 3 directories from the collection_select, the id's of those directories would look like this in the params: directory: !map:HashWithIndifferentAccess id: - "2" - "4" - "6" I know that you can manually specify multiple selected items: <%= collection_select :directory, :id, @directories, :id, :name, {:selected => [2,4,6]}, {:size => 5, :multiple => true} %> I've also played around a bit and was able to us "to_i" against a single value in the params hash: <%= collection_select :directory, :id, @directories, :id, :name, {:selected => params[:directory][:id][0].to_i}, {:size => 5, :multiple => true} %> What I can't figure out is how to use all of the values of the :directory params at the same time so what the user selected remains after the form is submitted. Thanks for any help.
ruby-on-rails
null
null
null
null
null
open
Rails, collection_select - remembering values with :selected after form submitted === (Using Rails 2.3.5 on an internal work server with no choice of versions, and I'm pretty new) I'm building a search form where I need to provide a list of directories to a user so they can select which one(s) to search against. I'm trying to figure out how to get the selected values of a collection_select to remain after the form is submitted. Say the user selected 3 directories from the collection_select, the id's of those directories would look like this in the params: directory: !map:HashWithIndifferentAccess id: - "2" - "4" - "6" I know that you can manually specify multiple selected items: <%= collection_select :directory, :id, @directories, :id, :name, {:selected => [2,4,6]}, {:size => 5, :multiple => true} %> I've also played around a bit and was able to us "to_i" against a single value in the params hash: <%= collection_select :directory, :id, @directories, :id, :name, {:selected => params[:directory][:id][0].to_i}, {:size => 5, :multiple => true} %> What I can't figure out is how to use all of the values of the :directory params at the same time so what the user selected remains after the form is submitted. Thanks for any help.
0
1,271,239
08/13/2009 10:45:36
98,693
04/30/2009 15:58:34
721
40
What is current software development/design book you read?
I am constantly interested in reading interesting software development or design books. I think this post could be a great source to share opinions on books currently read by users. Especially I would be interested to know if the book is worth buying/reading and what is the summary in the user own words (pretty short mini-review). My special areas of interest are: - Patterns - Networking - large scale software design - concurrency - high performance software - high availability software - embedded Thanks, Ovanes P.S. I hope this post is not subjective, because it is pretty hard to find user opinions on newcomer books and find newcomer books at all.
software-engineering
software-design
high-availability
null
null
08/13/2009 11:56:41
not constructive
What is current software development/design book you read? === I am constantly interested in reading interesting software development or design books. I think this post could be a great source to share opinions on books currently read by users. Especially I would be interested to know if the book is worth buying/reading and what is the summary in the user own words (pretty short mini-review). My special areas of interest are: - Patterns - Networking - large scale software design - concurrency - high performance software - high availability software - embedded Thanks, Ovanes P.S. I hope this post is not subjective, because it is pretty hard to find user opinions on newcomer books and find newcomer books at all.
4
11,132,819
06/21/2012 06:39:01
1,471,203
06/21/2012 06:22:06
1
0
Open source Alfresco
Hi I am new to Alfresco I have installed enterprise edition of Alfresco but I guess its 30 days trial only and only for evaluation purpose. I have three question. 1. Is alfresco available in free version or not ? 2. Alfresco is Content management or Document management ? 3. Can I customize Alfresco to build any time of web application e.g Shopping Cart, Library Management, Job Portal. If answer is yes then how difficult it would be ? Just like Joomla(PHP CMS) there are millions of installer, we need to download the installer and install the module and your entire application will be converted to your choice e.g Shopping Cart, Library Management, Job Portal within a minute with minimum effort.
java
content-management-system
content
customization
alfresco
07/12/2012 19:42:25
off topic
Open source Alfresco === Hi I am new to Alfresco I have installed enterprise edition of Alfresco but I guess its 30 days trial only and only for evaluation purpose. I have three question. 1. Is alfresco available in free version or not ? 2. Alfresco is Content management or Document management ? 3. Can I customize Alfresco to build any time of web application e.g Shopping Cart, Library Management, Job Portal. If answer is yes then how difficult it would be ? Just like Joomla(PHP CMS) there are millions of installer, we need to download the installer and install the module and your entire application will be converted to your choice e.g Shopping Cart, Library Management, Job Portal within a minute with minimum effort.
2
5,502,182
03/31/2011 15:17:00
96,823
04/27/2009 23:38:49
1,401
47
How to make rails 3 I18n translation automatically safe?
I use rails 3. Is there any easy way to tell I18n to respect 'html safness' of string used in interpolation and make all translated string html safe by default? So if I have this `en.yml`: en: user_with_name: 'User with name <em>%{name}</em>' and I use `t('user_with_name', :name => @user.name)`, I get users name html escaped, but `<em>` and `</em>` is left as is?
ruby-on-rails-3
internationalization
automation
html-safe
null
null
open
How to make rails 3 I18n translation automatically safe? === I use rails 3. Is there any easy way to tell I18n to respect 'html safness' of string used in interpolation and make all translated string html safe by default? So if I have this `en.yml`: en: user_with_name: 'User with name <em>%{name}</em>' and I use `t('user_with_name', :name => @user.name)`, I get users name html escaped, but `<em>` and `</em>` is left as is?
0
5,820,031
04/28/2011 14:15:27
570,191
01/10/2011 17:43:57
772
56
Is there a basic good tutorial for implementing internationalization with C# + ASP.NET?
I'm looking for ways to implement internationalization in our web-based software. Of course, I'm not asking for a specific implementation, just a simple example that should guide me to the right (if there's such a thing) direction. One thing that worries me, for instance, is DateTime handling. When users input Dates in a textbox, how should I validate that entry based on the current language settings (mm/dd/yyyy x dd/mm/yyyy)? What about the text itself, where should I store it. Of course I can create my own structures, but is there something ready to use? How to create it? And how to retrieve in runtime?
c#
asp.net
internationalization
null
null
01/23/2012 19:19:23
not constructive
Is there a basic good tutorial for implementing internationalization with C# + ASP.NET? === I'm looking for ways to implement internationalization in our web-based software. Of course, I'm not asking for a specific implementation, just a simple example that should guide me to the right (if there's such a thing) direction. One thing that worries me, for instance, is DateTime handling. When users input Dates in a textbox, how should I validate that entry based on the current language settings (mm/dd/yyyy x dd/mm/yyyy)? What about the text itself, where should I store it. Of course I can create my own structures, but is there something ready to use? How to create it? And how to retrieve in runtime?
4
7,326,703
09/06/2011 22:04:13
879,664
08/05/2011 00:03:11
89
4
Are curly braces required in @interface declarations in Objective-c?
The following code compiles: @interface MyClass : ParentClass // missing { // missing } @property (nonatomic, copy) NSString *myString; @end I'm wondering if the curly braces in `@interface` declarations are actually necessary.
objective-c
interface
curly-braces
null
null
null
open
Are curly braces required in @interface declarations in Objective-c? === The following code compiles: @interface MyClass : ParentClass // missing { // missing } @property (nonatomic, copy) NSString *myString; @end I'm wondering if the curly braces in `@interface` declarations are actually necessary.
0
11,395,308
07/09/2012 12:46:24
575,281
01/14/2011 05:46:14
998
9
C program to read from hex file giving unexpected output
How come this program does not read a hex file correctly? void ReadFile(char *name) { FILE *file; file = fopen(name, "rb"); if (!file) { fprintf(stderr, "Unable to open file %s", name); return; } //Getting file length fseek(file, 0, SEEK_END); fileLen=ftell(file); fseek(file, 0, SEEK_SET); //Allocating memory buffer=(char *)malloc(fileLen+1); if (!buffer) { fprintf(stderr, "Mem error!"); fclose(file); return; } fread(buffer, fileLen, 1, file); fclose(file); } int main() { var32 code; char filename[20]; printf("Enter the file name: "); scanf("%s", &filename); ReadFile(filename); printf("FIle contents: %x\n",buffer); } If i print a huge hex file, it just prints 5 to 6 digits.
c
null
null
null
null
07/09/2012 13:47:07
too localized
C program to read from hex file giving unexpected output === How come this program does not read a hex file correctly? void ReadFile(char *name) { FILE *file; file = fopen(name, "rb"); if (!file) { fprintf(stderr, "Unable to open file %s", name); return; } //Getting file length fseek(file, 0, SEEK_END); fileLen=ftell(file); fseek(file, 0, SEEK_SET); //Allocating memory buffer=(char *)malloc(fileLen+1); if (!buffer) { fprintf(stderr, "Mem error!"); fclose(file); return; } fread(buffer, fileLen, 1, file); fclose(file); } int main() { var32 code; char filename[20]; printf("Enter the file name: "); scanf("%s", &filename); ReadFile(filename); printf("FIle contents: %x\n",buffer); } If i print a huge hex file, it just prints 5 to 6 digits.
3
10,410,404
05/02/2012 08:45:02
1,336,541
04/16/2012 14:27:20
1
0
Malicious Codes And Open Source Projects
I was wondering how can I be sure about safety of codes in open source projects, Specially the ones with thousands lines of code including functions like popen() system(). How can I know there is no harmful and malicious code in there? Is there anyway I can examine the code safely? Regards
c++
objective-c
c
security
open-source
05/03/2012 12:38:17
not constructive
Malicious Codes And Open Source Projects === I was wondering how can I be sure about safety of codes in open source projects, Specially the ones with thousands lines of code including functions like popen() system(). How can I know there is no harmful and malicious code in there? Is there anyway I can examine the code safely? Regards
4
9,920,007
03/29/2012 06:16:55
1,106,598
12/19/2011 19:26:44
16
0
How to run php files on Phone Gap?
I need to run some php files with my application, I uploaded them to my website. I have read an article here, I did same thing for my files but my php file is working with ajax, so I couldnt run it. I tried all possible ways but I am still mistaken. search.html creates a link via js and passes this link to get_data.php, and shows results in the same page with `results` tag. search.html function abc(target_url) { target_url = target_url||(generate_url()||"http://nces.ed.gov/collegenavigator/?"); ajax = window.XMLHttpRequest?(new XMLHttpRequest()):(new ActiveXObject("Microsoft.XMLHttp")); ajax.onreadystatechange=function() { if(ajax.readyState===4) { html_data = ajax.responseText; //Do stuff with it like parsing, etc //alert(html_data); window.loading.style.visibility="hidden"; document.getElementById("results").innerHTML = html_data ||"We're sorry"; } }; ajax.open("GET", "./get_data.php?url="+encodeURIComponent(target_url), true); ajax.send(null); window.loading.style.visibility="visible"; } This is get_data.php <?php include_once('simple_html_dom.php'); $target_url = $_REQUEST["url"]; $html = new simple_html_dom(); $html->load_file($target_url); $gokhan='arik'; #$anchors = array_diff($html->find('table[class=resultsTable] a'), $html->find('td[class=addbutton] a')); $h2 = $html->find('table[class=resultsTable] h2'); $ipeds = $html->find('p[class=ipeds hoverID]'); foreach($html->find('div[id=ctl00_cphCollegeNavBody_ucResultsMain_divMsg]') as $nOfResults){ echo "<b>".strip_tags($nOfResults)."</b>"; } $loca = $html->find('table[class=itables] tbody tr td[class=pbe]'); for($i=0;$i<count($h2);$i++) { if(strip_tags($h2[$i])=="") continue; #echo strip_tags(strtr($ipeds[$i], array("&nbsp;"=>" "))); $iped = explode(" ", strip_tags(strtr($ipeds[$i], array("&nbsp;"=>" ")))); echo "<li data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'> <div class='ui-btn-inner ui-li'> <div class='ui-btn-text'> <a href='search2.php?id=".$iped[2]."' class='ui-link-inherit'><h3 class='ui-li-heading'>".strip_tags($h2[$i])."</h3><p class='ui-li-desc'>".strip_tags(strtr($loca[$i], array('</h2>'=>'</h2> ')))."</p></a> </div> <span class='ui-icon ui-icon-arrow-r ui-icon-shadow'/> </div> </li> "; } ?>
php
ajax
mobile
phonegap
null
null
open
How to run php files on Phone Gap? === I need to run some php files with my application, I uploaded them to my website. I have read an article here, I did same thing for my files but my php file is working with ajax, so I couldnt run it. I tried all possible ways but I am still mistaken. search.html creates a link via js and passes this link to get_data.php, and shows results in the same page with `results` tag. search.html function abc(target_url) { target_url = target_url||(generate_url()||"http://nces.ed.gov/collegenavigator/?"); ajax = window.XMLHttpRequest?(new XMLHttpRequest()):(new ActiveXObject("Microsoft.XMLHttp")); ajax.onreadystatechange=function() { if(ajax.readyState===4) { html_data = ajax.responseText; //Do stuff with it like parsing, etc //alert(html_data); window.loading.style.visibility="hidden"; document.getElementById("results").innerHTML = html_data ||"We're sorry"; } }; ajax.open("GET", "./get_data.php?url="+encodeURIComponent(target_url), true); ajax.send(null); window.loading.style.visibility="visible"; } This is get_data.php <?php include_once('simple_html_dom.php'); $target_url = $_REQUEST["url"]; $html = new simple_html_dom(); $html->load_file($target_url); $gokhan='arik'; #$anchors = array_diff($html->find('table[class=resultsTable] a'), $html->find('td[class=addbutton] a')); $h2 = $html->find('table[class=resultsTable] h2'); $ipeds = $html->find('p[class=ipeds hoverID]'); foreach($html->find('div[id=ctl00_cphCollegeNavBody_ucResultsMain_divMsg]') as $nOfResults){ echo "<b>".strip_tags($nOfResults)."</b>"; } $loca = $html->find('table[class=itables] tbody tr td[class=pbe]'); for($i=0;$i<count($h2);$i++) { if(strip_tags($h2[$i])=="") continue; #echo strip_tags(strtr($ipeds[$i], array("&nbsp;"=>" "))); $iped = explode(" ", strip_tags(strtr($ipeds[$i], array("&nbsp;"=>" ")))); echo "<li data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'> <div class='ui-btn-inner ui-li'> <div class='ui-btn-text'> <a href='search2.php?id=".$iped[2]."' class='ui-link-inherit'><h3 class='ui-li-heading'>".strip_tags($h2[$i])."</h3><p class='ui-li-desc'>".strip_tags(strtr($loca[$i], array('</h2>'=>'</h2> ')))."</p></a> </div> <span class='ui-icon ui-icon-arrow-r ui-icon-shadow'/> </div> </li> "; } ?>
0
8,266,195
11/25/2011 08:04:46
1,063,837
11/24/2011 11:27:58
8
0
java method explanation
This is probably really simple but i am having difficulty understanding it. @Override // says override this method so it can inherit from the super-class,is this true? public void onCreate(Bundle savedInstanceState) { // its a public method, that returns // no value, with the params Bundle savedInstanceState, is this correct? super.onCreate(savedInstanceState); // what does this do? mGestureDetector = new GestureDetector(this, new LearnGestureListener());// and this
java
null
null
null
null
04/18/2012 19:31:09
too localized
java method explanation === This is probably really simple but i am having difficulty understanding it. @Override // says override this method so it can inherit from the super-class,is this true? public void onCreate(Bundle savedInstanceState) { // its a public method, that returns // no value, with the params Bundle savedInstanceState, is this correct? super.onCreate(savedInstanceState); // what does this do? mGestureDetector = new GestureDetector(this, new LearnGestureListener());// and this
3
3,848,502
10/03/2010 03:47:54
410,793
08/04/2010 12:50:55
30
0
Javascript Global variables
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript"> var toggle; toggle=1; function open(){ jQuery(window).bind("beforeunload", function(){$.post("logout.php");}) $.post("online.php",function(data){ $("#Layer6").html(data); }); } function toggle() { $("#Layer4").animate({height:'toggle'}); $("#Layer6").animate({height:'toggle'}); if(toggle==1) { $("#toggle").attr('src',"toggle_up.jpg"); toggle=0; } else { $("#toggle").attr('src',"toggle_down.jpg"); toggle=1; } } </script> Here i have defined toggle as a global variable,and set its value to be 1 initially. When toggle() is executed,the value of toggle should change as its a global variable.Upon execution,the script doesn't seem to work at all(the toggle part). Kindly help. Thanks !
javascript
variables
global
null
null
null
open
Javascript Global variables === <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript"> var toggle; toggle=1; function open(){ jQuery(window).bind("beforeunload", function(){$.post("logout.php");}) $.post("online.php",function(data){ $("#Layer6").html(data); }); } function toggle() { $("#Layer4").animate({height:'toggle'}); $("#Layer6").animate({height:'toggle'}); if(toggle==1) { $("#toggle").attr('src',"toggle_up.jpg"); toggle=0; } else { $("#toggle").attr('src',"toggle_down.jpg"); toggle=1; } } </script> Here i have defined toggle as a global variable,and set its value to be 1 initially. When toggle() is executed,the value of toggle should change as its a global variable.Upon execution,the script doesn't seem to work at all(the toggle part). Kindly help. Thanks !
0
573,072
02/21/2009 14:07:51
62,192
02/03/2009 23:53:51
42
9
Tricks to Google for desired page quickly
I like to use Google to quickly locate API documentation. To get better results, I type some keywords that give desired results as top lines. For example: JavaScript: MDC Array slice MDC String indexOf Ruby ruby doc Dir glob rubyonrails ActionMailer What are your favourite tricks to pick the desired pages quickly?
google
documentation
find
fast
tricks
11/27/2011 17:34:02
not constructive
Tricks to Google for desired page quickly === I like to use Google to quickly locate API documentation. To get better results, I type some keywords that give desired results as top lines. For example: JavaScript: MDC Array slice MDC String indexOf Ruby ruby doc Dir glob rubyonrails ActionMailer What are your favourite tricks to pick the desired pages quickly?
4
1,533,773
10/07/2009 19:45:59
21,240
09/23/2008 16:49:20
332
12
Cocoa-Touch: UIPickerView viewForRow crashing
I have a UIPickerView, in it's delegate I'm trying to customize the view for a row. I'm using the 3.1 SDK. So in the delegate I have: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { // view.backgroundColor = [UIColor redColor]; return view; } From the apple docs: If the previously used view (the view parameter) is adequate, return that. If you return a different view, the previously used view is released. The picker view centers the returned view in the rectangle for row. When I run this, my UIPickerView control doesn't have any items in it, and after a short while crashes. When I remove this particular method (which is optional for the delegate), I can see the labels I set via the titleForRow method, and it will no longer crash. I'm pretty new to cocoa (and cocoa-touch), I'm not sure the view.backgroundColor thing will work, but even when returning the unmodified old view (which I must do anyway for most rows) crashes my app. Am I doing something wrong?
iphone
iphone-sdk-3.1
cocoa-touch
null
null
null
open
Cocoa-Touch: UIPickerView viewForRow crashing === I have a UIPickerView, in it's delegate I'm trying to customize the view for a row. I'm using the 3.1 SDK. So in the delegate I have: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { // view.backgroundColor = [UIColor redColor]; return view; } From the apple docs: If the previously used view (the view parameter) is adequate, return that. If you return a different view, the previously used view is released. The picker view centers the returned view in the rectangle for row. When I run this, my UIPickerView control doesn't have any items in it, and after a short while crashes. When I remove this particular method (which is optional for the delegate), I can see the labels I set via the titleForRow method, and it will no longer crash. I'm pretty new to cocoa (and cocoa-touch), I'm not sure the view.backgroundColor thing will work, but even when returning the unmodified old view (which I must do anyway for most rows) crashes my app. Am I doing something wrong?
0
10,318,600
04/25/2012 15:15:25
1,174,359
01/27/2012 20:44:28
43
1
On open src what licenses allow me to sell my app
I'm building an application but I need to get some free assets. So I don't know much about licenses on open source. My question is under which licenses am I free to sell my application if I use other people assets? I know all licenses have rules but i need to clarify this. for instance Creative Commons Attribution 3.0 This license requires you to attribute the author of the content in the way that they specify. Provided the author is properly credited, it is generally safe to use this content in a commercial work. they mean all I have to do is place their name on Credits? excuse my english.
licensing
assets
null
null
null
04/25/2012 15:25:50
off topic
On open src what licenses allow me to sell my app === I'm building an application but I need to get some free assets. So I don't know much about licenses on open source. My question is under which licenses am I free to sell my application if I use other people assets? I know all licenses have rules but i need to clarify this. for instance Creative Commons Attribution 3.0 This license requires you to attribute the author of the content in the way that they specify. Provided the author is properly credited, it is generally safe to use this content in a commercial work. they mean all I have to do is place their name on Credits? excuse my english.
2
1,209,587
07/30/2009 21:46:28
131,398
06/30/2009 23:05:09
13
2
Validating JSON data.
I am using json in some AJAX request and am currently manually validating each entry using (if "key" in json.some_location.keys()) over and over again. Is there a simpler way to do this (like XML validation)? Note: I am open to validation libraries, but would like something I can drop into django itself (not python eggs).
django
json
validation
null
null
null
open
Validating JSON data. === I am using json in some AJAX request and am currently manually validating each entry using (if "key" in json.some_location.keys()) over and over again. Is there a simpler way to do this (like XML validation)? Note: I am open to validation libraries, but would like something I can drop into django itself (not python eggs).
0
9,280,977
02/14/2012 17:00:40
349,041
05/24/2010 14:33:52
456
16
C# - Are there any advantages or benefits to using ternary operators?
Are there any advantages or benefits to using tertiary operators for if statements? For example, is the following more efficient? Or considered better programming practice? variable1 = string.IsNullOrEmpty(variable2) ? "string value" : ""; Compared to the following format: if (string.IsNullOrEmpty(coordinatorEmailAddress)) { variable = "not null" } else { variable = ""; }
c#
asp.net
null
null
null
02/14/2012 19:12:21
not constructive
C# - Are there any advantages or benefits to using ternary operators? === Are there any advantages or benefits to using tertiary operators for if statements? For example, is the following more efficient? Or considered better programming practice? variable1 = string.IsNullOrEmpty(variable2) ? "string value" : ""; Compared to the following format: if (string.IsNullOrEmpty(coordinatorEmailAddress)) { variable = "not null" } else { variable = ""; }
4
10,039,151
04/06/2012 04:34:52
803,801
06/17/2011 18:59:12
339
3
File object not being modified by function
I want the following code to get ask the user for a file and store it in curFile if it exists, which shouldn't be a problem since curFile is passed by reference. If the process is successful, it should return true, otherwise it should return false. File curFile = null; // Open a file and set curFile to this file openFile(curFile); bool openFile(File file) { // Ask the user for the file to open File tempFile = getFileFromUserInput() // If the file exists, set file and (thus curFile) to tempFile and return true if (tempFile.exists()) { file = tempFile; return true; } else { return false; } } The problem is that it doesn't set curFile = tempFile. I think the reason for this is that although curFile is an object and is passed by reference, I'm not modifying this object in the function, I'm putting a new object in the variable. But I'm still not sure if this is the reason why it's not working. getFileFromUserInput() is actually a Swing method FileChooser.getSelectedFile(), in case that's relevant. One fix is to return the file object instead of a bool. But that would cause curFile to be written over by the return value even when it shouldn't, such as when the file doesn't exist. There are some fixes for this, like returning null if it's an invalid file and saving the old file in a temporary variable in case null is returned, but that's ugly. The other method is to return both the bool and File wrapped in an object, but that's even uglier. So am I stuck with method one, or is there a nice way to do this?
java
swing
file
reference
null
null
open
File object not being modified by function === I want the following code to get ask the user for a file and store it in curFile if it exists, which shouldn't be a problem since curFile is passed by reference. If the process is successful, it should return true, otherwise it should return false. File curFile = null; // Open a file and set curFile to this file openFile(curFile); bool openFile(File file) { // Ask the user for the file to open File tempFile = getFileFromUserInput() // If the file exists, set file and (thus curFile) to tempFile and return true if (tempFile.exists()) { file = tempFile; return true; } else { return false; } } The problem is that it doesn't set curFile = tempFile. I think the reason for this is that although curFile is an object and is passed by reference, I'm not modifying this object in the function, I'm putting a new object in the variable. But I'm still not sure if this is the reason why it's not working. getFileFromUserInput() is actually a Swing method FileChooser.getSelectedFile(), in case that's relevant. One fix is to return the file object instead of a bool. But that would cause curFile to be written over by the return value even when it shouldn't, such as when the file doesn't exist. There are some fixes for this, like returning null if it's an invalid file and saving the old file in a temporary variable in case null is returned, but that's ugly. The other method is to return both the bool and File wrapped in an object, but that's even uglier. So am I stuck with method one, or is there a nice way to do this?
0
6,948,007
08/04/2011 20:17:39
499,417
11/06/2010 19:26:35
1,026
25
iPhone - Is there a way to know if a reference is (still) valid?
Let's say I ASSIGn a instance var with an object given in parameter. I don't knwo what is this object, so I don't want to retain it. But... that reference I have to that object can be invalid at some time, fopr exampel if the obhject is released, or is about to be released (autorelease pool). So, inside my class instance, can I know if the reference I have keps into an instance variable can be used without any risk of crash ?
iphone
validation
memory-management
reference
null
null
open
iPhone - Is there a way to know if a reference is (still) valid? === Let's say I ASSIGn a instance var with an object given in parameter. I don't knwo what is this object, so I don't want to retain it. But... that reference I have to that object can be invalid at some time, fopr exampel if the obhject is released, or is about to be released (autorelease pool). So, inside my class instance, can I know if the reference I have keps into an instance variable can be used without any risk of crash ?
0
1,242,948
08/07/2009 04:56:01
45,909
12/13/2008 02:51:11
388
14
center background-position
How can I center a background?
css
null
null
null
null
null
open
center background-position === How can I center a background?
0
10,286,128
04/23/2012 18:25:21
987,881
10/10/2011 14:30:42
13
0
main domain and sub-domain are promiscuous
My site with the main domain name www.mysite.com works well before. (I use mysite to hide my actual domain name here). It's LAMP server in linode, set up with the guide http://library.linode.com/lamp-guides/ubuntu-10.04-lucid . I want to add sub.mysite.com for another virtual host on my host. I follow http://davidpodley.com/2010/02/11/setting-up-subdomains-in-linode-and-apache/ and after I do a2ensite sub.mysite.com /etc/init.d/apache2 restart some users of www.mysite.com will access sub.mysite.com not www.mysite.com. I can found them in /srv/www/sub.mysite.com/logs/access.log and they tell me the problem. They should only access www.mysite.com. However, it works well on my PC. Why the users of www.mysite.com go to sub.mysite.com? Can anyone help me? --------------------------------------------------- Some informations: I added sub in A records 24 hours ago: **My A Records is:** Hostname IP Address TTL Options 96.126.98.96 Default Edit | Remove sub 96.126.98.96 Default Edit | Remove mail 96.126.98.96 Default Edit | Remove www 96.126.98.96 Default Edit | Remove **my server's hostname is mysite, and my server's /etc/hosts is** 127.0.0.1 localhost.localdomain localhost 96.126.98.96 mysite.mysite.com mysite **apache2ctl -S:** VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:443 is a NameVirtualHost default server mysite.com (/etc/apache2/sites-enabled/mysite.com:10) port 443 namevhost mysite.com (/etc/apache2/sites-enabled/mysite.com:10) *:80 is a NameVirtualHost default server sub.mysite.com (/etc/apache2/sites-enabled/sub.mysite.com:1) port 80 namevhost sub.mysite.com (/etc/apache2/sites-enabled/sub.mysite.com:1) port 80 namevhost mysite.com (/etc/apache2/sites-enabled/mysite.com:1) /etc/apache2/sites-enabled/mysite.com: <VirtualHost *:80> ServerAdmin mysite@gmail.com ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /srv/www/mysite.com/public_html/ ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key ServerAdmin mysite@gmail.com ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /srv/www/mysite.com/public_html/ ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> /etc/apache2/sites-enabled/sub.mysite.com: <VirtualHost *:80> ServerAdmin mysite@gmail.com ServerName sub.mysite.com ServerAlias www.sub.mysite.com DocumentRoot /srv/www/sub.mysite.com/public_html/ # DocumentRoot /srv/www/mysite.com/public_html/sub ErrorLog /srv/www/sub.mysite.com/logs/error.log CustomLog /srv/www/sub.mysite.com/logs/access.log combined </VirtualHost> Thank you!
apache
subdomain
lamp
linode
null
null
open
main domain and sub-domain are promiscuous === My site with the main domain name www.mysite.com works well before. (I use mysite to hide my actual domain name here). It's LAMP server in linode, set up with the guide http://library.linode.com/lamp-guides/ubuntu-10.04-lucid . I want to add sub.mysite.com for another virtual host on my host. I follow http://davidpodley.com/2010/02/11/setting-up-subdomains-in-linode-and-apache/ and after I do a2ensite sub.mysite.com /etc/init.d/apache2 restart some users of www.mysite.com will access sub.mysite.com not www.mysite.com. I can found them in /srv/www/sub.mysite.com/logs/access.log and they tell me the problem. They should only access www.mysite.com. However, it works well on my PC. Why the users of www.mysite.com go to sub.mysite.com? Can anyone help me? --------------------------------------------------- Some informations: I added sub in A records 24 hours ago: **My A Records is:** Hostname IP Address TTL Options 96.126.98.96 Default Edit | Remove sub 96.126.98.96 Default Edit | Remove mail 96.126.98.96 Default Edit | Remove www 96.126.98.96 Default Edit | Remove **my server's hostname is mysite, and my server's /etc/hosts is** 127.0.0.1 localhost.localdomain localhost 96.126.98.96 mysite.mysite.com mysite **apache2ctl -S:** VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:443 is a NameVirtualHost default server mysite.com (/etc/apache2/sites-enabled/mysite.com:10) port 443 namevhost mysite.com (/etc/apache2/sites-enabled/mysite.com:10) *:80 is a NameVirtualHost default server sub.mysite.com (/etc/apache2/sites-enabled/sub.mysite.com:1) port 80 namevhost sub.mysite.com (/etc/apache2/sites-enabled/sub.mysite.com:1) port 80 namevhost mysite.com (/etc/apache2/sites-enabled/mysite.com:1) /etc/apache2/sites-enabled/mysite.com: <VirtualHost *:80> ServerAdmin mysite@gmail.com ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /srv/www/mysite.com/public_html/ ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key ServerAdmin mysite@gmail.com ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /srv/www/mysite.com/public_html/ ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> /etc/apache2/sites-enabled/sub.mysite.com: <VirtualHost *:80> ServerAdmin mysite@gmail.com ServerName sub.mysite.com ServerAlias www.sub.mysite.com DocumentRoot /srv/www/sub.mysite.com/public_html/ # DocumentRoot /srv/www/mysite.com/public_html/sub ErrorLog /srv/www/sub.mysite.com/logs/error.log CustomLog /srv/www/sub.mysite.com/logs/access.log combined </VirtualHost> Thank you!
0
4,671,695
01/12/2011 17:10:23
566,868
01/07/2011 12:28:48
37
1
How to simulate keys with integer in C#
There's an integer, say it's a year, but it's a variable, not constant. How do I simulate keypressing it?
c#
keyboard
simulation
null
null
01/12/2011 17:15:45
not a real question
How to simulate keys with integer in C# === There's an integer, say it's a year, but it's a variable, not constant. How do I simulate keypressing it?
1
7,817,144
10/19/2011 05:59:32
687,080
04/01/2011 06:54:17
11
0
AES Encryption using 256 bit hex key
Is there any way or sample through which we can acheive AES Encrypt using 256 bit hex key. Also what are the specifications for a 256 bit hex key. (also does it have to do with the character length).
encryption
hex
key
aes
null
10/27/2011 13:41:23
not a real question
AES Encryption using 256 bit hex key === Is there any way or sample through which we can acheive AES Encrypt using 256 bit hex key. Also what are the specifications for a 256 bit hex key. (also does it have to do with the character length).
1
11,049,052
06/15/2012 10:34:31
558,283
12/30/2010 12:42:46
6
0
How to display ancestors with XML::Twig?
I do not know how to display the ancestors_or_self of one Element. Here is the error message I get when using the method ancestors_or_self(): *Can't call method "print" without a package or object reference at xxxx* #!/usr/bin/perl -w use warnings; use XML::Twig; my $t= XML::Twig->new; my $v= XML::Twig::Elt->new; $v= $t->first_elt('[@id]'); $v->print; print ("\n\n"); $v->ancestors_or_self->print; thanks for your help on Perl XML::Twig
perl
perl-module
xml-twig
ancestor
null
null
open
How to display ancestors with XML::Twig? === I do not know how to display the ancestors_or_self of one Element. Here is the error message I get when using the method ancestors_or_self(): *Can't call method "print" without a package or object reference at xxxx* #!/usr/bin/perl -w use warnings; use XML::Twig; my $t= XML::Twig->new; my $v= XML::Twig::Elt->new; $v= $t->first_elt('[@id]'); $v->print; print ("\n\n"); $v->ancestors_or_self->print; thanks for your help on Perl XML::Twig
0
10,352,427
04/27/2012 14:22:46
7,106
09/15/2008 13:10:41
375
7
Checking for Clashes in a set of Repeating Appointments/dates
Our system allows the scheduling of capacity on a reoccurring, open ended basis. Thus, the capacity is stored as a basis for the capacity and a repeat frequency. We then allow booking into the capacity. Capacity is stored for unique things. Capacity for a single unique thing may occur on multiple repeat frequencies. We call these sessions. For example, "Understanding Web Security" might run the first Monday of the month and every other month on the first Wednesday. A given unique thing may clash with another unique thing. So "Understanding Web Security" can clash with "Basic HTML". But two sets of capacity for "Understanding Web Security" can not clash with each other. i.e. setting up "Understanding Web Security" to run the first Monday of the month in session 1 and to run every other Monday in session 2 would be invalid. Repeat frequencies are pretty much as-per-outlook. The problem is, with no end date, and with certain frequencies, you can EVENTUALLY get a clash, but it might be in years time. Is there an efficient way to detect clashes from a sequence definition?
algorithm
date
appointment
clash
null
null
open
Checking for Clashes in a set of Repeating Appointments/dates === Our system allows the scheduling of capacity on a reoccurring, open ended basis. Thus, the capacity is stored as a basis for the capacity and a repeat frequency. We then allow booking into the capacity. Capacity is stored for unique things. Capacity for a single unique thing may occur on multiple repeat frequencies. We call these sessions. For example, "Understanding Web Security" might run the first Monday of the month and every other month on the first Wednesday. A given unique thing may clash with another unique thing. So "Understanding Web Security" can clash with "Basic HTML". But two sets of capacity for "Understanding Web Security" can not clash with each other. i.e. setting up "Understanding Web Security" to run the first Monday of the month in session 1 and to run every other Monday in session 2 would be invalid. Repeat frequencies are pretty much as-per-outlook. The problem is, with no end date, and with certain frequencies, you can EVENTUALLY get a clash, but it might be in years time. Is there an efficient way to detect clashes from a sequence definition?
0
333,271
12/02/2008 07:38:07
38,803
11/19/2008 03:23:42
219
11
Good resources for learning Factor
Having recently come across [this introduction to Factor][1], I've been a bit curious to learn more. Aside from the official FAQ mentioned there, do you have resources for learning the language (as well as the stack-based "paradigm," if that's the right word) that you've found helpful? As a side note, would learning Forth help, or is that like comparing C to Python (or what have you)? [1]: http://elasticdog.com/2008/11/beginning-factor-introduction/
factor
concatenative-languages
forth
postfix
null
07/26/2012 22:57:24
not constructive
Good resources for learning Factor === Having recently come across [this introduction to Factor][1], I've been a bit curious to learn more. Aside from the official FAQ mentioned there, do you have resources for learning the language (as well as the stack-based "paradigm," if that's the right word) that you've found helpful? As a side note, would learning Forth help, or is that like comparing C to Python (or what have you)? [1]: http://elasticdog.com/2008/11/beginning-factor-introduction/
4
2,747,346
04/30/2010 20:07:10
330,041
04/30/2010 19:41:35
1
0
Windows Phone 7, MVVM, Silverlight and navigation best practice / patterns and strategies
Whilst building a Windows Phone 7 app. using the MVVM pattern we've struggled to get to grips with a pattern or technique to centralise navigation logic that will fit with MVVM. To give an example, everytime the app. calls our web service we check that the logon token we've assigned the app. earlier hasn't expired. We always return some status to the phone from the web service and one of those might be Enum.AuthenticationExpired. If we receive that I'd imagine we'd alert the user and navigate back to the login screen. (this is one of many examples of status we might receive) Now, wanting to keep things DRY, that sort of logic feels like it should be in one place. Therein lies my question. How should I go about modelling navigation that relies on (essentially) switch or if statements to tell us where to navigate to next without repeating that in every view. Are there recognised patterns or techniques that someone could recommend? Thanks
windows-phone-7
mvvm
silverlight-4.0
null
null
null
open
Windows Phone 7, MVVM, Silverlight and navigation best practice / patterns and strategies === Whilst building a Windows Phone 7 app. using the MVVM pattern we've struggled to get to grips with a pattern or technique to centralise navigation logic that will fit with MVVM. To give an example, everytime the app. calls our web service we check that the logon token we've assigned the app. earlier hasn't expired. We always return some status to the phone from the web service and one of those might be Enum.AuthenticationExpired. If we receive that I'd imagine we'd alert the user and navigate back to the login screen. (this is one of many examples of status we might receive) Now, wanting to keep things DRY, that sort of logic feels like it should be in one place. Therein lies my question. How should I go about modelling navigation that relies on (essentially) switch or if statements to tell us where to navigate to next without repeating that in every view. Are there recognised patterns or techniques that someone could recommend? Thanks
0
9,068,298
01/30/2012 17:46:22
328,397
04/28/2010 23:54:42
3,385
79
How does "Unfriend Finder" work? (Chrome Extension that somehow modifies Facebook's webpage)
I'm looking at [unfriendfinder][1] and am curious how it would hook into the Facebook page and what the Chrome Extension is doing. Is this a development pattern I could follow for my own applications (where I require Chrome and modify the Facebook home page). How difficult would this be to port to other browsers? [1]: https://www.unfriendfinder.com/home
facebook
google-chrome
null
null
null
null
open
How does "Unfriend Finder" work? (Chrome Extension that somehow modifies Facebook's webpage) === I'm looking at [unfriendfinder][1] and am curious how it would hook into the Facebook page and what the Chrome Extension is doing. Is this a development pattern I could follow for my own applications (where I require Chrome and modify the Facebook home page). How difficult would this be to port to other browsers? [1]: https://www.unfriendfinder.com/home
0
8,973,957
01/23/2012 15:21:15
912,102
08/25/2011 12:49:55
18
0
Decide that database is Sybase or MSSQL
I would like to write an SQL script or query which can decide that the used database is MSSQL or Sybase. How can I do that? Thanks, Maestro
sql-server
query
tsql
script
sybase
null
open
Decide that database is Sybase or MSSQL === I would like to write an SQL script or query which can decide that the used database is MSSQL or Sybase. How can I do that? Thanks, Maestro
0
9,771,971
03/19/2012 14:26:36
1,278,752
03/19/2012 14:17:47
1
0
How to call Java Services In Windows Phone 7
Now i am developing a Windows Phone 7 app .My Requirement is need to call a java services in my app. Please tell me how to call java services in wp7?Please give me the reply ASAP. Thanks in Advance
windows-phone-7
null
null
null
null
03/20/2012 05:33:19
not a real question
How to call Java Services In Windows Phone 7 === Now i am developing a Windows Phone 7 app .My Requirement is need to call a java services in my app. Please tell me how to call java services in wp7?Please give me the reply ASAP. Thanks in Advance
1
1,569,406
10/14/2009 22:41:10
2,974
08/26/2008 09:39:16
10,296
476
Is it worthwhile asking anonymous feedback from colleagues?
G'day, I'm always trying to improve my performance and, after listening to [this interesting podcast][1] on the topic, I was wondering if people think it is worthwhile asking for feedback from colleagues. I am thinking of obtaining feedback anonymously in the manner suggested in the podcast by using the [Rypple site][2]. And by asking one single, short question that directly addresses a specific aspect of my work or behaviour. For example, I'm looking at questions such as: * What can I do to improve the way in which our teams work together?, * How can I help **you** be more effective in **your** job?, * What parts of my technique could I improve based on the presentation I gave today? * etc. cheers, [1]: http://itc.conversationsnetwork.org/shows/detail4265.html [2]: http://rypple.com/home/
self-improvement
feedback
null
null
null
11/08/2011 17:32:41
not constructive
Is it worthwhile asking anonymous feedback from colleagues? === G'day, I'm always trying to improve my performance and, after listening to [this interesting podcast][1] on the topic, I was wondering if people think it is worthwhile asking for feedback from colleagues. I am thinking of obtaining feedback anonymously in the manner suggested in the podcast by using the [Rypple site][2]. And by asking one single, short question that directly addresses a specific aspect of my work or behaviour. For example, I'm looking at questions such as: * What can I do to improve the way in which our teams work together?, * How can I help **you** be more effective in **your** job?, * What parts of my technique could I improve based on the presentation I gave today? * etc. cheers, [1]: http://itc.conversationsnetwork.org/shows/detail4265.html [2]: http://rypple.com/home/
4
11,643,516
07/25/2012 05:52:54
1,328,804
04/12/2012 10:13:29
93
0
The best choice for online web game development
I want to make an online web game as complex as farmville etc.. What language is the best choice for the purpose of this job?. I looked a bit and I think Java and Flex are suitable. Which one Java or Flex?
java
actionscript-3
web
flex4
game-center
07/25/2012 06:12:40
not constructive
The best choice for online web game development === I want to make an online web game as complex as farmville etc.. What language is the best choice for the purpose of this job?. I looked a bit and I think Java and Flex are suitable. Which one Java or Flex?
4
10,120,568
04/12/2012 09:07:36
961,018
09/23/2011 11:19:37
379
20
If I could extend Java enums I would do X
I have a class that is intended to be used for **a future internal authentication library** ( I know there are already such existing libs ). So to make things **as simple as possible** to the developers using it **in many coming future projects** to make use of this library I had in mind them defining an enum with roles, simple example, the role sysadmin: // Not a project specific class, but Auth is intended to be part of the library class Auth { public static enum AUTH_ROLE { sysadmin( new Rule(AdminController.class, "*") ); // ====================================================================================================================================== // -------------------------------------------------------------------------------------------------------------------------------------- // ====================================================================================================================================== private String name; AUTH_ROLE() { name = this.name(); Roles.add( name ); } AUTH_ROLE(String name) { this.name = name; Roles.add( name ); } AUTH_ROLE(Rule rule) { name = this.name(); Roles.add( name, rule ); } AUTH_ROLE(String name, Rule rule) { this.name = name; Roles.add( name, rule ); } public String getName() { return name; } } public boolean hasRole(AUTH_ROLE role) { String[] usersRoles = getLoggedInUsersRoles(); for ( String userRole : usersRoles ) { if ( role.getName().equals(userRole) ) return true; } return false; } } Now, as you can see, the **enum AUTH_ROLE** is **currently** **defined** in what is **supposed** to be a **non project** specific class, **but the Auth class** is supposed to be part of the library that is to **be used by many projects**. The problem is that with the current design, I am forced to also define the **roles and their rules** in that same class, Auth, in order to define the method hasRole ( AUTH_ROLE ...) ... What I would like to do, is to have this enum with all the current logic in it defined **ONCE** for **ALL PROJECTS** and allow for the developers in new projects to be able to **simply** just define the roles and their rules. The problem I believe exists, is that you cannot extend an enum in Java, so all that in the enum logic ( although simple, not the point! ) actually has to be repeated for each new project and possibly implement and interface provided in the library. If it were possible to extend, then a new enum would have been able to simply define those roles, that is : public enum AUTH_ROLE extends authlibrary.Auth.AUTH_ROLE { sysadmin( new Rule(AdminController.class, "*") ); } The **other option**, as I just mentioned, is to **define an interface** for the enum to implement, although as you can understand **we end up** with **an implementation for each new project**, be it as simple as copy and paste. I am not interested **in converting stuff to string or number** back and forth before calling the method and what not... This question is **not so much** about how **you can circumvent** **the limitations** of the language, but merely to agree/accept that his is a limitation that would otherwise have resulted in cleaner code. So, does anyone agree with that in this particular case, extending/including another enum would have been benefitial that would have resulted in less code? Ps. I might be an idiot, so I want to reserve the right call myself an idiot :)
java
java-ee
enums
null
null
04/14/2012 13:27:22
not constructive
If I could extend Java enums I would do X === I have a class that is intended to be used for **a future internal authentication library** ( I know there are already such existing libs ). So to make things **as simple as possible** to the developers using it **in many coming future projects** to make use of this library I had in mind them defining an enum with roles, simple example, the role sysadmin: // Not a project specific class, but Auth is intended to be part of the library class Auth { public static enum AUTH_ROLE { sysadmin( new Rule(AdminController.class, "*") ); // ====================================================================================================================================== // -------------------------------------------------------------------------------------------------------------------------------------- // ====================================================================================================================================== private String name; AUTH_ROLE() { name = this.name(); Roles.add( name ); } AUTH_ROLE(String name) { this.name = name; Roles.add( name ); } AUTH_ROLE(Rule rule) { name = this.name(); Roles.add( name, rule ); } AUTH_ROLE(String name, Rule rule) { this.name = name; Roles.add( name, rule ); } public String getName() { return name; } } public boolean hasRole(AUTH_ROLE role) { String[] usersRoles = getLoggedInUsersRoles(); for ( String userRole : usersRoles ) { if ( role.getName().equals(userRole) ) return true; } return false; } } Now, as you can see, the **enum AUTH_ROLE** is **currently** **defined** in what is **supposed** to be a **non project** specific class, **but the Auth class** is supposed to be part of the library that is to **be used by many projects**. The problem is that with the current design, I am forced to also define the **roles and their rules** in that same class, Auth, in order to define the method hasRole ( AUTH_ROLE ...) ... What I would like to do, is to have this enum with all the current logic in it defined **ONCE** for **ALL PROJECTS** and allow for the developers in new projects to be able to **simply** just define the roles and their rules. The problem I believe exists, is that you cannot extend an enum in Java, so all that in the enum logic ( although simple, not the point! ) actually has to be repeated for each new project and possibly implement and interface provided in the library. If it were possible to extend, then a new enum would have been able to simply define those roles, that is : public enum AUTH_ROLE extends authlibrary.Auth.AUTH_ROLE { sysadmin( new Rule(AdminController.class, "*") ); } The **other option**, as I just mentioned, is to **define an interface** for the enum to implement, although as you can understand **we end up** with **an implementation for each new project**, be it as simple as copy and paste. I am not interested **in converting stuff to string or number** back and forth before calling the method and what not... This question is **not so much** about how **you can circumvent** **the limitations** of the language, but merely to agree/accept that his is a limitation that would otherwise have resulted in cleaner code. So, does anyone agree with that in this particular case, extending/including another enum would have been benefitial that would have resulted in less code? Ps. I might be an idiot, so I want to reserve the right call myself an idiot :)
4
7,897,604
10/26/2011 00:56:43
421,366
08/16/2010 04:48:58
43
2
hook_views_pre_render(&$view) seems to be called after the pager rendering
I am designing and ecommerce store and I am trying to sort the products by availability using a hook_view. My function product_eta_seconds return the current eta of a product. Here is my module: function availability_sort_views_pre_render(&$view) { if ('uc_products' == $view->name && 'page_1' == $view->current_display) { $view->result = array_reverse($view->result); $deliveryTime=array(); foreach ($view->result as $viewRow){ $deliveryTime[] = product_eta_seconds($viewRow->nid); } asort($deliveryTime); $view->result = sortArrayByArray($view->result,$deliveryTime); } } function sortArrayByArray($array,$orderArray) { $ordered = array(); foreach($orderArray as $key=>$value) { if(array_key_exists($key,$array)) { $ordered[$key] = $array[$key]; unset($array[$key]); } } return $ordered + $array; } The problem is the view->result returns only 9 items (my pager value) so when I look at page 2, there are results that should show up on the 1st page (with a lower eta). Is there a solution to get all items of the view without the pager and apply the pager, when the view is rendered ? Any other solution would suit though. I am using Views 3
drupal
sorting
drupal-6
views
hook
10/26/2011 19:50:33
too localized
hook_views_pre_render(&$view) seems to be called after the pager rendering === I am designing and ecommerce store and I am trying to sort the products by availability using a hook_view. My function product_eta_seconds return the current eta of a product. Here is my module: function availability_sort_views_pre_render(&$view) { if ('uc_products' == $view->name && 'page_1' == $view->current_display) { $view->result = array_reverse($view->result); $deliveryTime=array(); foreach ($view->result as $viewRow){ $deliveryTime[] = product_eta_seconds($viewRow->nid); } asort($deliveryTime); $view->result = sortArrayByArray($view->result,$deliveryTime); } } function sortArrayByArray($array,$orderArray) { $ordered = array(); foreach($orderArray as $key=>$value) { if(array_key_exists($key,$array)) { $ordered[$key] = $array[$key]; unset($array[$key]); } } return $ordered + $array; } The problem is the view->result returns only 9 items (my pager value) so when I look at page 2, there are results that should show up on the 1st page (with a lower eta). Is there a solution to get all items of the view without the pager and apply the pager, when the view is rendered ? Any other solution would suit though. I am using Views 3
3
7,689,052
10/07/2011 14:59:04
965,241
09/26/2011 14:27:23
1
0
one application registered with two ICON on IPhone?
Our customer has a particular request for my project. how to use short-cut to launch our application? what I am trying to do is create an standalone application does nothing except to launch my main application to skip some step go to more depth level? maybe one application is registered with two icons, one is for main process, one is to do short-cut process. is that possible? I have searched this site, someone mentioned to create an application to launch another application? is there an example or a piece of code? Thanks in advanced.
launch
null
null
null
null
null
open
one application registered with two ICON on IPhone? === Our customer has a particular request for my project. how to use short-cut to launch our application? what I am trying to do is create an standalone application does nothing except to launch my main application to skip some step go to more depth level? maybe one application is registered with two icons, one is for main process, one is to do short-cut process. is that possible? I have searched this site, someone mentioned to create an application to launch another application? is there an example or a piece of code? Thanks in advanced.
0
3,660,402
09/07/2010 16:05:47
436,336
08/31/2010 20:05:40
6
0
Should I be learning Flash/Flex/ActionScript or HTML/CSS/JS ("HTML5")?
I'm fairly new to this whole web-development thing (2 weeks maybe, my 1st scraping of code exists [here][1], I quite like it) and I ended up learning to use Adobe's Flash Builder 4, which I have come to quite like (although Action Script annoys me at times). Recently however I've been reading a lot about "the future" of web development, RIAs, web 2.0 etc, and it appears the whole Flash/Flex/ActionScript frame work's main competition will be the HTML/CSS/JS stack (or "HTML 5"). So obviously I don't want to take the time to learn a language (Flash/Flex/AS3) that will end up dead in a couple of years and end up having to learn another one (HTML/CSS/JS), when I could just move over now. My main interests are fairly information rich (database orientated) web sites, with high levels of user interactivity for customisation, uploading, etc. I like the whole mobile web aspect, and would like to have the capacity to also develop for that platform, as well as mobile apps etc. I love the whole "live" aspect (like the tour de flex light up map that shows user activity), not particularly bothered by uber complex animation and obviously want things to be responsive and user friendly. So yea, any input on this would be much appreciated, I'd just like some advice for overall direction for my personal learning and development. Thanks!! [1]: http://www.AreaInsight.com
javascript
actionscript-3
html5
flash-builder
web2.0
09/09/2010 12:16:30
not constructive
Should I be learning Flash/Flex/ActionScript or HTML/CSS/JS ("HTML5")? === I'm fairly new to this whole web-development thing (2 weeks maybe, my 1st scraping of code exists [here][1], I quite like it) and I ended up learning to use Adobe's Flash Builder 4, which I have come to quite like (although Action Script annoys me at times). Recently however I've been reading a lot about "the future" of web development, RIAs, web 2.0 etc, and it appears the whole Flash/Flex/ActionScript frame work's main competition will be the HTML/CSS/JS stack (or "HTML 5"). So obviously I don't want to take the time to learn a language (Flash/Flex/AS3) that will end up dead in a couple of years and end up having to learn another one (HTML/CSS/JS), when I could just move over now. My main interests are fairly information rich (database orientated) web sites, with high levels of user interactivity for customisation, uploading, etc. I like the whole mobile web aspect, and would like to have the capacity to also develop for that platform, as well as mobile apps etc. I love the whole "live" aspect (like the tour de flex light up map that shows user activity), not particularly bothered by uber complex animation and obviously want things to be responsive and user friendly. So yea, any input on this would be much appreciated, I'd just like some advice for overall direction for my personal learning and development. Thanks!! [1]: http://www.AreaInsight.com
4
8,029,724
11/06/2011 19:22:21
1,032,545
11/06/2011 17:47:14
1
0
fopen opens File before calling it
First my code: void RecvPaths(char *szRETURN) { FILE *hFILE; char *szFILE = new char[2048]; hFILE = fopen("FLM.tmp", "r"); do { fgets(szFILE, 2048, hFILE); strcat(szRETURN, szFILE); } while(!feof(hFILE)); fclose(hFILE); return; } And now my Problem: I start my Programm which contains this function. It creates a new process with `CreateProcess`. The programm called this way should write some data to "FLM.tmp". When it has finished, I call this funtion to read the data, written by the other programm. But it's always nothing. I also opened the file with the Windows explorer and there's also nothing. So I checked the other programm and this works definitely. Next I tried to change the Path of `fopen`in this function and let the path in the other Program stay the same and NOW it writes his data in "FLM.tmp". Its like that my prog opens this file before starting the new process and that it's blocking it. But I never opened this File in another part of my prog. Has anyone an idea what could solve this?
c++
file
fopen
createprocess
null
11/10/2011 20:14:52
too localized
fopen opens File before calling it === First my code: void RecvPaths(char *szRETURN) { FILE *hFILE; char *szFILE = new char[2048]; hFILE = fopen("FLM.tmp", "r"); do { fgets(szFILE, 2048, hFILE); strcat(szRETURN, szFILE); } while(!feof(hFILE)); fclose(hFILE); return; } And now my Problem: I start my Programm which contains this function. It creates a new process with `CreateProcess`. The programm called this way should write some data to "FLM.tmp". When it has finished, I call this funtion to read the data, written by the other programm. But it's always nothing. I also opened the file with the Windows explorer and there's also nothing. So I checked the other programm and this works definitely. Next I tried to change the Path of `fopen`in this function and let the path in the other Program stay the same and NOW it writes his data in "FLM.tmp". Its like that my prog opens this file before starting the new process and that it's blocking it. But I never opened this File in another part of my prog. Has anyone an idea what could solve this?
3
4,358,975
12/05/2010 13:15:58
508,462
11/15/2010 15:55:11
30
3
C / Arduino: variable int array
I'm writing a class for the arduino. It's been going well so far but I'm sort of stuck now... I have declared an int array in my class `class myClass { public: MyClass(int size); private: int _intArray[]; };` When I initialize the class `MyClass myClass1(5)` I need the array to look like this {0,0,0,0,0}. My question: what do I need to do so that the array contains 'size' amount of zeros? MyClass::MyClass(int size) { //what goes here to dynamically initialize the array for(int i=0; i < size; i++) _intArray[i] = 0; }
c
arrays
class
integer
arduino
null
open
C / Arduino: variable int array === I'm writing a class for the arduino. It's been going well so far but I'm sort of stuck now... I have declared an int array in my class `class myClass { public: MyClass(int size); private: int _intArray[]; };` When I initialize the class `MyClass myClass1(5)` I need the array to look like this {0,0,0,0,0}. My question: what do I need to do so that the array contains 'size' amount of zeros? MyClass::MyClass(int size) { //what goes here to dynamically initialize the array for(int i=0; i < size; i++) _intArray[i] = 0; }
0
9,268,611
02/13/2012 21:53:30
1,247,509
02/06/2012 22:16:41
8
2
Similarities between tcl and Python
Right now, I'm learning Python and Javascript, and someone recently suggested to me that I learn tcl. Being a relative noob to programming, I have no idea what tcl is, and if it is similar to Python. As i love python, I'm wondering how similar the two are so I can see if I want to start it.
python
tcl
null
null
null
02/14/2012 02:41:23
not constructive
Similarities between tcl and Python === Right now, I'm learning Python and Javascript, and someone recently suggested to me that I learn tcl. Being a relative noob to programming, I have no idea what tcl is, and if it is similar to Python. As i love python, I'm wondering how similar the two are so I can see if I want to start it.
4
9,246,446
02/12/2012 04:25:15
549,226
12/20/2010 21:57:15
516
15
Issue with SocketTimeoutException and Jetty
I'm using a Jetty based servlet to do RPC and I'm having an issue where a request that takes a long time throws the following exception on the server: > 2012-02-11 21:07:07,673 [btpool0-4] DEBUG org.mortbay.log - EXCEPTION > java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(Unknown Source) > at org.mortbay.io.ByteArrayBuffer.readFrom(ByteArrayBuffer.java:168) > at org.mortbay.io.bio.StreamEndPoint.fill(StreamEndPoint.java:99) > at org.mortbay.jetty.bio.SocketConnector$Connection.fill(SocketConnector > .java:190) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:277) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) > at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector. > java:217) > at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool > .java:475) 2012-02-11 21:07:07,674 [btpool0-4] DEBUG org.mortbay.log > - EOF I tried setting the Connection,Keep-Alive http request property but that had no effect and from what I can gather, http 1.1 (which I'm pretty sure I'm using) is persistent by default. So I think there are 2 ways I can try to address this: 1. figure out how to prevent the timeout exception from being thrown at all 2. Have the client issue the initial request without waiting for a response, and then ping with separate requests to check when the server is done.
java
http
servlets
jetty
null
null
open
Issue with SocketTimeoutException and Jetty === I'm using a Jetty based servlet to do RPC and I'm having an issue where a request that takes a long time throws the following exception on the server: > 2012-02-11 21:07:07,673 [btpool0-4] DEBUG org.mortbay.log - EXCEPTION > java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(Unknown Source) > at org.mortbay.io.ByteArrayBuffer.readFrom(ByteArrayBuffer.java:168) > at org.mortbay.io.bio.StreamEndPoint.fill(StreamEndPoint.java:99) > at org.mortbay.jetty.bio.SocketConnector$Connection.fill(SocketConnector > .java:190) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:277) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) > at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector. > java:217) > at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool > .java:475) 2012-02-11 21:07:07,674 [btpool0-4] DEBUG org.mortbay.log > - EOF I tried setting the Connection,Keep-Alive http request property but that had no effect and from what I can gather, http 1.1 (which I'm pretty sure I'm using) is persistent by default. So I think there are 2 ways I can try to address this: 1. figure out how to prevent the timeout exception from being thrown at all 2. Have the client issue the initial request without waiting for a response, and then ping with separate requests to check when the server is done.
0
8,174,223
11/17/2011 20:59:43
245,076
01/06/2010 21:23:13
514
4
PHP MVC Best practices - model for every controller?
In terms of a best practice, when working with MVC frameworks, is it fair to say that every controller should have an associated model? and only one model? Or, should it be more decoupled, where as you create models for specific purposes and they can be used anywhere within the app? Thanks! Just interested in any suggestions
php
mvc
null
null
null
11/17/2011 21:20:47
not constructive
PHP MVC Best practices - model for every controller? === In terms of a best practice, when working with MVC frameworks, is it fair to say that every controller should have an associated model? and only one model? Or, should it be more decoupled, where as you create models for specific purposes and they can be used anywhere within the app? Thanks! Just interested in any suggestions
4
4,937,335
02/08/2011 19:23:24
209,869
11/12/2009 19:07:14
699
42
Which authentication gem would you use in Rails 3 to integrate with as many third party authentication providers
We need to have basic authentication in our Rails 3 app but the requirements are to also integrate with providers such as facebook, linked in, google apps, twitter, etc. We are looking at: - Clearance - Divise - AuthLogic - ... and others. Any advice on which one to use that provides most of what we need?
ruby-on-rails
authentication
null
null
null
null
open
Which authentication gem would you use in Rails 3 to integrate with as many third party authentication providers === We need to have basic authentication in our Rails 3 app but the requirements are to also integrate with providers such as facebook, linked in, google apps, twitter, etc. We are looking at: - Clearance - Divise - AuthLogic - ... and others. Any advice on which one to use that provides most of what we need?
0
6,569,820
07/04/2011 09:50:49
827,888
07/04/2011 09:50:49
1
0
How To Find Datatypes information in oracle schema?
How to get all the datatypes information in oracle schema. Whole datatypes with all details like name type pression etc.. Vijay.
types
null
null
null
null
null
open
How To Find Datatypes information in oracle schema? === How to get all the datatypes information in oracle schema. Whole datatypes with all details like name type pression etc.. Vijay.
0
741,369
04/12/2009 06:39:09
89,910
04/12/2009 05:31:53
1
0
How do I get out of PHP development and into .Net development?
I have a B.S. in computer science and have been working as a PHP developer for about three years. I don't want to be a PHP developer and would like to move into .Net development. I don't expect it to be easy, but I am prepared to do whatever it takes to make it happen. I'm confident in my ability to learn the tools, languages, and design patterns necessary to do the work, but I'm worried about getting my foot in the door. Most jobs -- even junior-level jobs -- require X years of .Net experience. But if I need .Net work experience to get a job, then how am I going to get .Net work experience? I have a couple of ideas, but I don't know how solid they are: 1. Start building a portfolio of .Net applications that proves I can do the work. I'm worried that this won't be effective, since building software in one's free time isn't professional experience in the eyes of HR folks and recruiters. 2. Try to find a way to get into QA work and hope that, someday, this leads to a development job. Do you guys have any recommendations?
career-development
.net
php
null
null
01/26/2012 21:57:56
not constructive
How do I get out of PHP development and into .Net development? === I have a B.S. in computer science and have been working as a PHP developer for about three years. I don't want to be a PHP developer and would like to move into .Net development. I don't expect it to be easy, but I am prepared to do whatever it takes to make it happen. I'm confident in my ability to learn the tools, languages, and design patterns necessary to do the work, but I'm worried about getting my foot in the door. Most jobs -- even junior-level jobs -- require X years of .Net experience. But if I need .Net work experience to get a job, then how am I going to get .Net work experience? I have a couple of ideas, but I don't know how solid they are: 1. Start building a portfolio of .Net applications that proves I can do the work. I'm worried that this won't be effective, since building software in one's free time isn't professional experience in the eyes of HR folks and recruiters. 2. Try to find a way to get into QA work and hope that, someday, this leads to a development job. Do you guys have any recommendations?
4
3,101,522
06/23/2010 12:24:37
365,118
06/12/2010 07:13:57
21
0
how to read email from gmail using c#
I want to create window application through which i can read email from gmail. Actually i want to read proper format of email like to,from,subject,cc and body.
c#
null
null
null
null
null
open
how to read email from gmail using c# === I want to create window application through which i can read email from gmail. Actually i want to read proper format of email like to,from,subject,cc and body.
0
8,648,921
12/27/2011 20:22:08
111,665
05/05/2009 19:48:19
3,246
44
Is the Google API key a requirement?
[This page][1] says This example won't work unless you use your own API key. Q: Is that true? [1]: http://code.google.com/apis/libraries/devguide.html#load_the_javascript_api_and_ajax_search_module
javascript
google
null
null
null
12/27/2011 21:01:16
not constructive
Is the Google API key a requirement? === [This page][1] says This example won't work unless you use your own API key. Q: Is that true? [1]: http://code.google.com/apis/libraries/devguide.html#load_the_javascript_api_and_ajax_search_module
4
8,008,235
11/04/2011 11:00:00
949,988
09/17/2011 07:12:46
38
2
code for alertaction of uinotification
UILocalNotification *notif = [[cls alloc] init]; notif.fireDate = [self.datePicker date]; notif.timeZone = [NSTimeZone defaultTimeZone]; notif.alertBody = @"Did you forget something?"; notif.alertAction = @"Show me"; if the user clicks on "showme" the app should open and he should get the alert. Where should i write this code?and if possible someone please give me a little bit of code
iphone
ios
xcode
null
null
null
open
code for alertaction of uinotification === UILocalNotification *notif = [[cls alloc] init]; notif.fireDate = [self.datePicker date]; notif.timeZone = [NSTimeZone defaultTimeZone]; notif.alertBody = @"Did you forget something?"; notif.alertAction = @"Show me"; if the user clicks on "showme" the app should open and he should get the alert. Where should i write this code?and if possible someone please give me a little bit of code
0
9,251,580
02/12/2012 18:47:57
1,205,335
02/12/2012 16:52:01
1
0
Stacking astronomy images with Python
I thought this was going to be easier but after a while I'm finally giving up on this, at least for a couple of hours... I wanted to reproduce this a trailing stars image from a timelapse set of pictures. Inspired by this: Inspiration image (I can't "upload" images because I'm a new user click links to imgur to see these if you want to): http:/i.stack.imgur.com/tZ7zW.jpg [The original author][1] used low resolution video frames taken with VirtualDub and combined with imageJ. I imagined I could easily reproduce this process but with a more memory-conscious approach with Python, so I could use [the original high-resolution images][2] for a better output. My algorithm's idea is simple, merging two images at a time, and then iterating by merging the resulting image with the next image. This done some hundreds of times and properly weighing it so that every image has the same contribution to the final result. I'm fairly new to python (and I'm no professional programmer, that'll be evident), but looking around it appears to me the Python Imaging Library is very standard, so I decided to use it (correct me if you think something else would be better). Here's what I have so far: #program to blend many images into one import os,Image files = os.listdir("./") finalimage=Image.open("./"+files[0]) #add the first image for i in range(1,len(files)): #note that this will skip files[0] but go all the way to the last file currentimage=Image.open("./"+files[i]) finalimage=Image.blend(finalimage,currentimage,1/float(i+1))#alpha is 1/i+1 so when the image is a combination of i images any adition only contributes 1/i+1. print "\r" + str(i+1) + "/" + str(len(files)) #lousy progress indicator finalimage.save("allblended.jpg","JPEG") This does what it's supposed to but the resulting image is dark, and if I simply try to enhance it, it's evident that information was lost due lack of depth in pixel's values. (I'm not sure what the proper term here is, color depth, color precision, pixel size). Here's the final result using low resolution images: http:/i.stack.imgur.com/ixppn.jpg or one I was trying with the full 4k by 2k resolution (from another set of photos): http:/i.stack.imgur.com/JbNWL.jpg So, I tried to fix it by setting the image mode: firstimage=Image.open("./"+files[0]) size = firstimage.size finalimage=Image.new("I",size) but apparently Image.blend does not accept that image mode. > ValueError: image has wrong mode Any ideas? (I also tried making the images "less dark" by multiplying it before combining them with im.point(lambda i: i * 2) but results were just as bad) [1]: http://www.reddit.com/r/pics/comments/pkycp/star_trails_above_earthly_light_trails_as_viewed/c3qa141 [2]: http://eol.jsc.nasa.gov/Videos/CrewEarthObservationsVideos/
python
image
pil
astronomy
color-depth
null
open
Stacking astronomy images with Python === I thought this was going to be easier but after a while I'm finally giving up on this, at least for a couple of hours... I wanted to reproduce this a trailing stars image from a timelapse set of pictures. Inspired by this: Inspiration image (I can't "upload" images because I'm a new user click links to imgur to see these if you want to): http:/i.stack.imgur.com/tZ7zW.jpg [The original author][1] used low resolution video frames taken with VirtualDub and combined with imageJ. I imagined I could easily reproduce this process but with a more memory-conscious approach with Python, so I could use [the original high-resolution images][2] for a better output. My algorithm's idea is simple, merging two images at a time, and then iterating by merging the resulting image with the next image. This done some hundreds of times and properly weighing it so that every image has the same contribution to the final result. I'm fairly new to python (and I'm no professional programmer, that'll be evident), but looking around it appears to me the Python Imaging Library is very standard, so I decided to use it (correct me if you think something else would be better). Here's what I have so far: #program to blend many images into one import os,Image files = os.listdir("./") finalimage=Image.open("./"+files[0]) #add the first image for i in range(1,len(files)): #note that this will skip files[0] but go all the way to the last file currentimage=Image.open("./"+files[i]) finalimage=Image.blend(finalimage,currentimage,1/float(i+1))#alpha is 1/i+1 so when the image is a combination of i images any adition only contributes 1/i+1. print "\r" + str(i+1) + "/" + str(len(files)) #lousy progress indicator finalimage.save("allblended.jpg","JPEG") This does what it's supposed to but the resulting image is dark, and if I simply try to enhance it, it's evident that information was lost due lack of depth in pixel's values. (I'm not sure what the proper term here is, color depth, color precision, pixel size). Here's the final result using low resolution images: http:/i.stack.imgur.com/ixppn.jpg or one I was trying with the full 4k by 2k resolution (from another set of photos): http:/i.stack.imgur.com/JbNWL.jpg So, I tried to fix it by setting the image mode: firstimage=Image.open("./"+files[0]) size = firstimage.size finalimage=Image.new("I",size) but apparently Image.blend does not accept that image mode. > ValueError: image has wrong mode Any ideas? (I also tried making the images "less dark" by multiplying it before combining them with im.point(lambda i: i * 2) but results were just as bad) [1]: http://www.reddit.com/r/pics/comments/pkycp/star_trails_above_earthly_light_trails_as_viewed/c3qa141 [2]: http://eol.jsc.nasa.gov/Videos/CrewEarthObservationsVideos/
0
11,493,020
07/15/2012 15:08:00
550,436
12/21/2010 19:54:13
419
2
How to read a pointer to integer pointers from a file?
I wanted to read a pointer to integer pointers from a file. I am using the following code to write the array to file: FILE *fp; int **myArray = NULL; int i, j; for(i = 0; i < 3; i++){ myArray = (int **)realloc(myArray, (i+1)*sizeof(int *)); for(j = 0; j < 4; j++){ myArray[i] = (int *)realloc(myArray[i], (j+1)*sizeof(int)); myArray[i][j] = i*j*10; } }
c
pointers
null
null
null
07/16/2012 07:27:37
not a real question
How to read a pointer to integer pointers from a file? === I wanted to read a pointer to integer pointers from a file. I am using the following code to write the array to file: FILE *fp; int **myArray = NULL; int i, j; for(i = 0; i < 3; i++){ myArray = (int **)realloc(myArray, (i+1)*sizeof(int *)); for(j = 0; j < 4; j++){ myArray[i] = (int *)realloc(myArray[i], (j+1)*sizeof(int)); myArray[i][j] = i*j*10; } }
1
11,091,907
06/18/2012 22:18:20
335,036
10/06/2008 18:02:50
1,905
29
How to track session in iis logs with classic asp app on windows server 2003
I'd like to use my IIS logs to track sessions in my app, but don't have a session key being pushed along the querystring in my pages. What's the easiest way to start tracking that in the log - put a querystring value in the iis logs, or is there a way to append session to the logs as a custom field? Using 32-bit classic asp against windows server 2003 64-bit.
iis
windows-server-2003
null
null
null
null
open
How to track session in iis logs with classic asp app on windows server 2003 === I'd like to use my IIS logs to track sessions in my app, but don't have a session key being pushed along the querystring in my pages. What's the easiest way to start tracking that in the log - put a querystring value in the iis logs, or is there a way to append session to the logs as a custom field? Using 32-bit classic asp against windows server 2003 64-bit.
0
200,908
10/14/2008 12:15:38
6,783
09/15/2008 12:37:24
25
5
Is there an easy-to-use, free or inexpensive, web-based business rules app with a GUI?
I am looking for a web-based business rules app that I can use with clients. After I get them started, the client would be able to enter new rules. Assume that the client has good Excel skills (as an example of level of tech sophistication) but has little patience for formal languages or programming. **Cost:** $0-$500 The resulting models will NOT be executable. Mindmaps are very useful, but the star configuration doesn't lend itself to flowchart-type applications. BRML is much too technical, and requires the author to break down processes into page-sized chunks. **Example of a use case:** - A box of widgets arrives at the client office. The user finds the section of the model for receiving a box. Which vendor sent the box? What does the user do with the contents of the box? Which features of our back-end Web app have to be used to account for the new widgets? The app will help the user find the answers to these questions. If the answers are not there, the user can enter new rules into the app. This process must be simple enough that the business user sees the value of the effort in the short term, not as some big investment that might pay off far in the future. **Possible features:** - A decision-tree-like UI that the user can follow to find out what to do in a given situation. - A search feature that allows the user to find a rule without following the tree. - Expand/collapse so the user can see large, detailed sections of the tree as single units. Does such an app currently exist? Thanks very much in advance, Adam Leffert
business
rules
mindmapping
gui
null
05/06/2012 23:09:32
not constructive
Is there an easy-to-use, free or inexpensive, web-based business rules app with a GUI? === I am looking for a web-based business rules app that I can use with clients. After I get them started, the client would be able to enter new rules. Assume that the client has good Excel skills (as an example of level of tech sophistication) but has little patience for formal languages or programming. **Cost:** $0-$500 The resulting models will NOT be executable. Mindmaps are very useful, but the star configuration doesn't lend itself to flowchart-type applications. BRML is much too technical, and requires the author to break down processes into page-sized chunks. **Example of a use case:** - A box of widgets arrives at the client office. The user finds the section of the model for receiving a box. Which vendor sent the box? What does the user do with the contents of the box? Which features of our back-end Web app have to be used to account for the new widgets? The app will help the user find the answers to these questions. If the answers are not there, the user can enter new rules into the app. This process must be simple enough that the business user sees the value of the effort in the short term, not as some big investment that might pay off far in the future. **Possible features:** - A decision-tree-like UI that the user can follow to find out what to do in a given situation. - A search feature that allows the user to find a rule without following the tree. - Expand/collapse so the user can see large, detailed sections of the tree as single units. Does such an app currently exist? Thanks very much in advance, Adam Leffert
4
9,697,729
03/14/2012 07:43:48
736,687
05/03/2011 18:05:08
1
0
Can't download tools and platforms in Android SDK manager
When I open "Android SDK Manager" it scan for platforms and tools. There are among others the following error **"Failed to fetch URL http://developer.lgmobile.com/sdk/android/repository.xml/addon.xml, reason: Connection reset"** That must be because it's a dead URL, but this is not my problem (I think).<br> After maybe 10 minutes, I have the opportunity to select the tools / platforms I want to install. I select "Android SDK Platform-tools" and press Install. In the pop-up window, I accept the license and press Install. Now showing "Downloading the Android SDK Platform-tools, revision 10" but after one hour download bar has not moved. My anti-virus program is deactivated, I have reinstalled Android SDK manager, and I am running it as administrator. Any ideas what my problem is? My system information is:<br> OS Win 7 32bit<br> Java JDK 6 Update 31 installed<br> Eclipse IDE for Java developers installed<br> Android ADK manager installed<br> I am on a small company network, going through a router acting as a firewall. I don't normal need to set up proxy for using internet, but can this be my problem? If so, anyone that can help me with settings for this?
android
eclipse
sdk
null
null
03/14/2012 08:01:54
off topic
Can't download tools and platforms in Android SDK manager === When I open "Android SDK Manager" it scan for platforms and tools. There are among others the following error **"Failed to fetch URL http://developer.lgmobile.com/sdk/android/repository.xml/addon.xml, reason: Connection reset"** That must be because it's a dead URL, but this is not my problem (I think).<br> After maybe 10 minutes, I have the opportunity to select the tools / platforms I want to install. I select "Android SDK Platform-tools" and press Install. In the pop-up window, I accept the license and press Install. Now showing "Downloading the Android SDK Platform-tools, revision 10" but after one hour download bar has not moved. My anti-virus program is deactivated, I have reinstalled Android SDK manager, and I am running it as administrator. Any ideas what my problem is? My system information is:<br> OS Win 7 32bit<br> Java JDK 6 Update 31 installed<br> Eclipse IDE for Java developers installed<br> Android ADK manager installed<br> I am on a small company network, going through a router acting as a firewall. I don't normal need to set up proxy for using internet, but can this be my problem? If so, anyone that can help me with settings for this?
2
5,460,535
03/28/2011 14:34:51
609,245
02/09/2011 05:40:56
3
0
Extract the text between the two substring in NSString
I need to extract the all the lines between two strings like Begin and End in the NSString. For example, <some text> Begin line1 line2 End <some Text> Begin line1 line2 End I need to discard all the text that is not coming under these blocks. Any idea how to do this?
iphone
string
nsstring
extraction
null
null
open
Extract the text between the two substring in NSString === I need to extract the all the lines between two strings like Begin and End in the NSString. For example, <some text> Begin line1 line2 End <some Text> Begin line1 line2 End I need to discard all the text that is not coming under these blocks. Any idea how to do this?
0
9,173,752
02/07/2012 09:25:07
1,129,951
01/04/2012 12:58:39
1
0
Need Logic for java script function
Need a function In Java script which can make all the valid factors of a given number.
javascript
logic
null
null
null
02/07/2012 09:30:07
not a real question
Need Logic for java script function === Need a function In Java script which can make all the valid factors of a given number.
1
3,530,780
08/20/2010 12:23:16
365,860
06/13/2010 20:31:08
23
0
Android : Is there any free PDF library for Android.
I need a PDF library for manipulating a PDF documents, ( Creating PDF, image convertinng to PDF ) and things like that but in Android . I do search a while and found iText but it doesn't work .
android
pdf
creation
null
null
04/14/2012 13:55:17
not constructive
Android : Is there any free PDF library for Android. === I need a PDF library for manipulating a PDF documents, ( Creating PDF, image convertinng to PDF ) and things like that but in Android . I do search a while and found iText but it doesn't work .
4
5,825,985
04/28/2011 22:57:50
156,708
08/14/2009 20:28:11
856
74
Code color styling in Eclipse
A nice simple question: Is there something similar to http://studiostyl.es/ for Eclipse?
java
eclipse
ide
colors
null
null
open
Code color styling in Eclipse === A nice simple question: Is there something similar to http://studiostyl.es/ for Eclipse?
0
10,181,463
04/16/2012 20:47:04
1,336,997
04/16/2012 18:22:53
6
0
Convert a char * to char
How to convert a char * to char. I have a char pointer `char * Data` which gets some value I also have a variable Char result Can I do `result = *(Data)`?If I do so its throwing me a null pointer assignment. I want to store the values in an array of result for different values of "Data" in a loop. Please help. Thanks.
c
null
null
null
null
04/16/2012 20:59:46
not a real question
Convert a char * to char === How to convert a char * to char. I have a char pointer `char * Data` which gets some value I also have a variable Char result Can I do `result = *(Data)`?If I do so its throwing me a null pointer assignment. I want to store the values in an array of result for different values of "Data" in a loop. Please help. Thanks.
1