PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
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
32
30.1k
OpenStatus_id
int64
0
4
11,728,067
07/30/2012 19:14:20
1,555,330
07/26/2012 16:06:26
13
0
Retrieving external JSON data
I need to be able to retrieve and display JSON data from a website for the application I am making. Before implementing it into my application, I thought I should make sure I understand how it works by testing it elsewhere. I made the following HTML and JSON code to test it, but if I run the application I get Uncaught TypeError: Cannot read property '0' of undefined at file:///android_asset/www/projectName.html:11 What am I doing wrong? HTML: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $.get('testData.json', function(data) { alert('get performed'); var obj = eval ("(" + data + ")"); $("p").html(obj.data_set[0].data1); }); }); }); </script> </head> <body> <h2>Heading</h2> <p>Display</p> <button>Click me</button> </body> </html> JSON file: [{"data_set":{"data1":"string","data2":null,"data3":22.0}}]
javascript
jquery
html
json
null
null
open
Retrieving external JSON data === I need to be able to retrieve and display JSON data from a website for the application I am making. Before implementing it into my application, I thought I should make sure I understand how it works by testing it elsewhere. I made the following HTML and JSON code to test it, but if I run the application I get Uncaught TypeError: Cannot read property '0' of undefined at file:///android_asset/www/projectName.html:11 What am I doing wrong? HTML: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $.get('testData.json', function(data) { alert('get performed'); var obj = eval ("(" + data + ")"); $("p").html(obj.data_set[0].data1); }); }); }); </script> </head> <body> <h2>Heading</h2> <p>Display</p> <button>Click me</button> </body> </html> JSON file: [{"data_set":{"data1":"string","data2":null,"data3":22.0}}]
0
11,728,068
07/30/2012 19:14:21
1,062,933
11/23/2011 23:14:07
333
15
How to Set a Value to a Sub-Property Item using TypInfo RTTI Methods?
In my Question: [How to use “Sender” parameter with “As” operator for more then one class at a time][1] [1]: http://stackoverflow.com/questions/11335829/how-to-use-sender-parameter-with-as-operator-for-more-then-one-class-at-a-ti I choose the Remy Lebeau's Answer because it was the most dynamic tech for most situations like that. It uses the RTTI TypInfo Class. But as I was using this class, another problem came: **How do we Set a sub-property value?** function TRemote.UpdateQuery(DataSet: TDataSet; SQL: String): Boolean; var PropInfo: PPropInfo; begin { atualiza o código SQL padrão de um dataSet de consulta tipo View } PropInfo := GetPropInfo(DataSet, 'SQL', []); if not Assigned(PropInfo) then begin Result := False; Exit; end; try DataSet.Close; SetPropValue(DataSet, PropInfo, SQL); DataSet.Open; Result := True; except Result := False; end; end; Example: I have a TIBQuery and I want to update the text of the SQL property. But the SQL property is a TStrings class, so I have to use SQL.Text. In the code above, It will raise an error "Invalid Property Type" because I got a TStrings and later I try to Set a normal String. **How to reach the SQL.Text using GetPropInfo?** Is there a common ancestor of TIBQuery and TZQuery that has the SQL property, so I can change to, instead of the TDataSet in the function parameter?
delphi
rtti
delphi-2006
null
null
null
open
How to Set a Value to a Sub-Property Item using TypInfo RTTI Methods? === In my Question: [How to use “Sender” parameter with “As” operator for more then one class at a time][1] [1]: http://stackoverflow.com/questions/11335829/how-to-use-sender-parameter-with-as-operator-for-more-then-one-class-at-a-ti I choose the Remy Lebeau's Answer because it was the most dynamic tech for most situations like that. It uses the RTTI TypInfo Class. But as I was using this class, another problem came: **How do we Set a sub-property value?** function TRemote.UpdateQuery(DataSet: TDataSet; SQL: String): Boolean; var PropInfo: PPropInfo; begin { atualiza o código SQL padrão de um dataSet de consulta tipo View } PropInfo := GetPropInfo(DataSet, 'SQL', []); if not Assigned(PropInfo) then begin Result := False; Exit; end; try DataSet.Close; SetPropValue(DataSet, PropInfo, SQL); DataSet.Open; Result := True; except Result := False; end; end; Example: I have a TIBQuery and I want to update the text of the SQL property. But the SQL property is a TStrings class, so I have to use SQL.Text. In the code above, It will raise an error "Invalid Property Type" because I got a TStrings and later I try to Set a normal String. **How to reach the SQL.Text using GetPropInfo?** Is there a common ancestor of TIBQuery and TZQuery that has the SQL property, so I can change to, instead of the TDataSet in the function parameter?
0
11,728,076
07/30/2012 19:14:42
429,280
08/24/2010 08:16:29
207
1
Unable to display a form - Codeigniter
I was trying out the tutorial on this link to create a form : http://codeigniter.com/user_guide/libraries/form_validation.html But when I type in the url(after creating the files of `form.php`, `formsuccess.php` and `myform.php`) `localhost/codeigniter/index.php/form`, I get the error of `404 Page Not Found`. I am new to Codeigniter. Can someone help me figure out the error ? Thanks and Regards.
php
codeigniter
null
null
null
null
open
Unable to display a form - Codeigniter === I was trying out the tutorial on this link to create a form : http://codeigniter.com/user_guide/libraries/form_validation.html But when I type in the url(after creating the files of `form.php`, `formsuccess.php` and `myform.php`) `localhost/codeigniter/index.php/form`, I get the error of `404 Page Not Found`. I am new to Codeigniter. Can someone help me figure out the error ? Thanks and Regards.
0
11,728,078
07/30/2012 19:14:48
1,509,103
07/07/2012 18:13:10
27
1
Access 2000 database growing fast
We have an Access 2000 format database running in Office Access 2003. However we have a problem with the size: when I merge the database, the size is about 250 mb. 2 days later, the size is 3 double about 750 mb. How can I see where this increase in size comes from? Can I look behind the scenes in Access? The database is running for a tennis club and our employees are working all day long with the database. Another programmer made the database and says it is common to Access the increase in size. How can I start to figure this out?
merge
office
null
null
null
null
open
Access 2000 database growing fast === We have an Access 2000 format database running in Office Access 2003. However we have a problem with the size: when I merge the database, the size is about 250 mb. 2 days later, the size is 3 double about 750 mb. How can I see where this increase in size comes from? Can I look behind the scenes in Access? The database is running for a tennis club and our employees are working all day long with the database. Another programmer made the database and says it is common to Access the increase in size. How can I start to figure this out?
0
11,728,079
07/30/2012 19:14:55
839,748
04/23/2011 16:50:07
54
0
jQuery UI slider - Cannot call method 'addClass' of undefined
I had this old jQuery UI slider that had worked just fine a few months ago, but now I seem to be getting an exception reading: Cannot call method 'addClass' of undefined. I've checked the values being passed into the slider and they're regular Javascript dates. $('#dateFilter').click(function() { return $('#sliderContainer').slideToggle(200); }); $(function() { var endFiling, startFiling; startFiling = Date.parse($('#startFiling').val()); endFiling = Date.parse($('#endFiling').val()); return $('#filingDateSlider').slider({ range: true, min: startFiling, max: endFiling, step: 86400000, values: [startFiling, endFiling], slide: function(event, ui) { var eD, end, sD, start; sD = new Date(ui.values[0]); start = dateFormat(sD); eD = new Date(ui.values[1]); end = dateFormat(eD); $('#filingStartDate').text(start); return $('#filingEndDate').text(end); } }); Is there a particular reason why I might be getting this new error? [1]: http://i.stack.imgur.com/luljy.jpg
javascript
jquery-ui
null
null
null
null
open
jQuery UI slider - Cannot call method 'addClass' of undefined === I had this old jQuery UI slider that had worked just fine a few months ago, but now I seem to be getting an exception reading: Cannot call method 'addClass' of undefined. I've checked the values being passed into the slider and they're regular Javascript dates. $('#dateFilter').click(function() { return $('#sliderContainer').slideToggle(200); }); $(function() { var endFiling, startFiling; startFiling = Date.parse($('#startFiling').val()); endFiling = Date.parse($('#endFiling').val()); return $('#filingDateSlider').slider({ range: true, min: startFiling, max: endFiling, step: 86400000, values: [startFiling, endFiling], slide: function(event, ui) { var eD, end, sD, start; sD = new Date(ui.values[0]); start = dateFormat(sD); eD = new Date(ui.values[1]); end = dateFormat(eD); $('#filingStartDate').text(start); return $('#filingEndDate').text(end); } }); Is there a particular reason why I might be getting this new error? [1]: http://i.stack.imgur.com/luljy.jpg
0
11,728,051
07/30/2012 19:13:03
1,563,692
07/30/2012 17:35:20
1
0
Refreshing canvas?
I try to display one from list of bitmaps during onDraw. <br /> When i'm passing list to the canvas all are display and stay in their places. <br /> When I pass one random bitmaps it's redrawing canvas all the time. <br /> All works when i'm using public void drawEnemy(Canvas canvas) but not exactly like I want when using public void drawEn(Canvas canvas). <br /> I want to display one random bitmap, then after a few seconds, delete it and display other bitmap. I think the problem is how I implemented onDrow() method. It's redrawing canvas all the time. Activity: public class NewGameActivity extends Activity{ NewGame newgame; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); // Landscape mode setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // no title this.requestWindowFeature(Window.FEATURE_NO_TITLE); // content Newgame.java newgame = new NewGame(this); setContentView(newgame); } Thread: public class MainThread extends Thread{ private SurfaceHolder surfaceHolder; private NewGame screen; public MainThread(SurfaceHolder surfaceHolder, NewGame ekran) { super(); this.surfaceHolder = surfaceHolder; this.screen= screen; } private boolean running; public void setRunning(boolean running) { this.running = running; } @Override public void run() { Canvas canvas; while (running) { canvas = null; try { canvas = this.surfaceHolder.lockCanvas(); synchronized (surfaceHolder) { this.screen.onDraw(canvas); } } finally { if (canvas != null) { surfaceHolder.unlockCanvasAndPost(canvas); } } } } } SurfaceView: public class NewGame extends SurfaceView implements SurfaceHolder.Callback{ private MainThread thread; private EnemyManager manager; public NewGame(Context context) { super(context); getHolder().addCallback(this); thread = new MainThread(getHolder(), this); manager = new EnemyManager(); // TODO Auto-generated constructor stub //adding enemy Enemy e1 = new Enemy(BitmapFactory.decodeResource(getResources(), R.drawable.card), 1); Enemy e2 = new Enemy(BitmapFactory.decodeResource(getResources(), R.drawable.horse), 2); EnemyLocation l1 = new EnemyLocation(60, 180); EnemyLocation l2 = new EnemyLocation(60, 50); manager.AddEnemy(e1, l1); manager.AddEnemy(e2, l2); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.saloon), 0, 0, null); manager.drawEn(canvas); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { thread.setRunning(true); thread.start(); } @Override public void surfaceDestroyed(SurfaceHolder holder) { thread.setRunning(false); thread.stop(); } @Override public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { manager.handleActionDown((int)event.getX(), (int)event.getY()); } return true; } } EnemyManager: public class EnemyManager { private ArrayList<Enemy> enemyList; private ArrayList<Enemy> suspects; private Enemy cow; private String message; private int suspectID; private Random rnd; public String getMessage() { return message; } public EnemyManager(){ enemyList = new ArrayList<Enemy>(); suspects = new ArrayList<Enemy>(); } public void AddEnemy(Enemy enemy, EnemyLocation loc){ // set x,y enemy localization enemy.setX(loc.getX()); enemy.setY(loc.getY()); enemyList.add(enemy); } public void clearEnemy() { enemyList.clear(); } // message if enemy touched public void handleActionDown(int x, int y) { for (Enemy enemy: enemyList) { if (enemy.wasTouched(x, y)) { message = enemy.getId(); return; } } } public void PrepareEnemy(){ suspectID = enemyList.get(rnd.nextInt(enemyList.size()+1)).getId(); suspects = new ArrayList<Enemy>(); suspects.add(getSuspectByID(suspectID)); } private Enemy SingleEnemy(){ Double i = 1 + Math.random() * ((enemyList.size()-1)+1); cow = getSuspectByID(i.intValue()); return cow; } private Enemy getSuspectByID(int suspectID) { for (Enemy s: enemyList) { if (s.getId() == suspectID) { return s; } } return null; } public void drawEn(Canvas canvas){ try { Enemy k = SingleEnemy(); canvas.drawBitmap(cow.picture, cow.x, cow.y, null); } catch (Exception e) { // TODO: handle exception } } // draw enemy public void drawEnemy(Canvas canvas) { try { for (Enemy enemy: enemyList) { canvas.drawBitmap(enemy.picture, enemy.x, enemy.y, null); } } catch (Exception e) { // TODO: handle exception } } } das
android
image-processing
ondraw
null
null
null
open
Refreshing canvas? === I try to display one from list of bitmaps during onDraw. <br /> When i'm passing list to the canvas all are display and stay in their places. <br /> When I pass one random bitmaps it's redrawing canvas all the time. <br /> All works when i'm using public void drawEnemy(Canvas canvas) but not exactly like I want when using public void drawEn(Canvas canvas). <br /> I want to display one random bitmap, then after a few seconds, delete it and display other bitmap. I think the problem is how I implemented onDrow() method. It's redrawing canvas all the time. Activity: public class NewGameActivity extends Activity{ NewGame newgame; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); // Landscape mode setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // no title this.requestWindowFeature(Window.FEATURE_NO_TITLE); // content Newgame.java newgame = new NewGame(this); setContentView(newgame); } Thread: public class MainThread extends Thread{ private SurfaceHolder surfaceHolder; private NewGame screen; public MainThread(SurfaceHolder surfaceHolder, NewGame ekran) { super(); this.surfaceHolder = surfaceHolder; this.screen= screen; } private boolean running; public void setRunning(boolean running) { this.running = running; } @Override public void run() { Canvas canvas; while (running) { canvas = null; try { canvas = this.surfaceHolder.lockCanvas(); synchronized (surfaceHolder) { this.screen.onDraw(canvas); } } finally { if (canvas != null) { surfaceHolder.unlockCanvasAndPost(canvas); } } } } } SurfaceView: public class NewGame extends SurfaceView implements SurfaceHolder.Callback{ private MainThread thread; private EnemyManager manager; public NewGame(Context context) { super(context); getHolder().addCallback(this); thread = new MainThread(getHolder(), this); manager = new EnemyManager(); // TODO Auto-generated constructor stub //adding enemy Enemy e1 = new Enemy(BitmapFactory.decodeResource(getResources(), R.drawable.card), 1); Enemy e2 = new Enemy(BitmapFactory.decodeResource(getResources(), R.drawable.horse), 2); EnemyLocation l1 = new EnemyLocation(60, 180); EnemyLocation l2 = new EnemyLocation(60, 50); manager.AddEnemy(e1, l1); manager.AddEnemy(e2, l2); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.saloon), 0, 0, null); manager.drawEn(canvas); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { thread.setRunning(true); thread.start(); } @Override public void surfaceDestroyed(SurfaceHolder holder) { thread.setRunning(false); thread.stop(); } @Override public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { manager.handleActionDown((int)event.getX(), (int)event.getY()); } return true; } } EnemyManager: public class EnemyManager { private ArrayList<Enemy> enemyList; private ArrayList<Enemy> suspects; private Enemy cow; private String message; private int suspectID; private Random rnd; public String getMessage() { return message; } public EnemyManager(){ enemyList = new ArrayList<Enemy>(); suspects = new ArrayList<Enemy>(); } public void AddEnemy(Enemy enemy, EnemyLocation loc){ // set x,y enemy localization enemy.setX(loc.getX()); enemy.setY(loc.getY()); enemyList.add(enemy); } public void clearEnemy() { enemyList.clear(); } // message if enemy touched public void handleActionDown(int x, int y) { for (Enemy enemy: enemyList) { if (enemy.wasTouched(x, y)) { message = enemy.getId(); return; } } } public void PrepareEnemy(){ suspectID = enemyList.get(rnd.nextInt(enemyList.size()+1)).getId(); suspects = new ArrayList<Enemy>(); suspects.add(getSuspectByID(suspectID)); } private Enemy SingleEnemy(){ Double i = 1 + Math.random() * ((enemyList.size()-1)+1); cow = getSuspectByID(i.intValue()); return cow; } private Enemy getSuspectByID(int suspectID) { for (Enemy s: enemyList) { if (s.getId() == suspectID) { return s; } } return null; } public void drawEn(Canvas canvas){ try { Enemy k = SingleEnemy(); canvas.drawBitmap(cow.picture, cow.x, cow.y, null); } catch (Exception e) { // TODO: handle exception } } // draw enemy public void drawEnemy(Canvas canvas) { try { for (Enemy enemy: enemyList) { canvas.drawBitmap(enemy.picture, enemy.x, enemy.y, null); } } catch (Exception e) { // TODO: handle exception } } } das
0
11,728,052
07/30/2012 19:13:04
1,253,462
03/06/2012 23:24:32
33
1
Transitioning from TableView to a SplitView
I have a splitview based app that I want to change so a table view is displayed first then transition to the splitview after a row is selected. The reason for this is I am working on a planner app and I have a single planner set using a splitview. I want to add a shelf to display first and then when a planner is selected open the splitview. I am starting with a tableview as I want to get the relationship working before I play with how I want to display the shelf. A couple sites ive looked at only have this code as a solution but it does not work for me(As expected) UISplitViewController *mySplitViewController = [[UISplitViewController alloc] init]; [self presentModalViewController:mySplitViewController animated:YES]; Everything is in a single storyboard. The tableview is embedded in a navigation controller if that makes a difference.
ios
uitableview
uisplitviewcontroller
null
null
null
open
Transitioning from TableView to a SplitView === I have a splitview based app that I want to change so a table view is displayed first then transition to the splitview after a row is selected. The reason for this is I am working on a planner app and I have a single planner set using a splitview. I want to add a shelf to display first and then when a planner is selected open the splitview. I am starting with a tableview as I want to get the relationship working before I play with how I want to display the shelf. A couple sites ive looked at only have this code as a solution but it does not work for me(As expected) UISplitViewController *mySplitViewController = [[UISplitViewController alloc] init]; [self presentModalViewController:mySplitViewController animated:YES]; Everything is in a single storyboard. The tableview is embedded in a navigation controller if that makes a difference.
0
11,386,691
07/08/2012 21:03:49
1,510,564
07/08/2012 20:58:56
1
0
failsafe reboot after remote linux server upgrade
Occasionally my (ubuntu) server upgrades fail. Recently due to some weird keymap cache not found by console-tools. So I had to put my sneakers on. Is there a way to predict these errors or test if they might occur? In this case the boot process stopped before sshd (or similar) was started and on the console the message press control-D to proceed. Is there a way to force the boot up to ignore these errors?
linux
boot
reboot
null
null
07/09/2012 00:34:13
off topic
failsafe reboot after remote linux server upgrade === Occasionally my (ubuntu) server upgrades fail. Recently due to some weird keymap cache not found by console-tools. So I had to put my sneakers on. Is there a way to predict these errors or test if they might occur? In this case the boot process stopped before sshd (or similar) was started and on the console the message press control-D to proceed. Is there a way to force the boot up to ignore these errors?
2
11,386,692
07/08/2012 21:04:10
462,113
09/29/2010 18:30:12
2,347
81
How do I tell android that it doesn't need to compress the camera image?
When I take picture with android, I call camera.TakePicture(shutterCallback, rawCallback, postCallback, jpegCallback); However I only need the post-image data. So I call camera.TakePicture(null, null, postCallback, null); I want to take sequential pictures as quickly as possible. The android spec tells me I have to wait for the jpeg callback to finish before I call takePicture again (fair enough). But does this mean I *have* to add a jpegCallback and wait for it to be called? Is the compression an unskippable part of the `Camera.takepicture` process for android? It seems like a waste to have to wait for a compressed version of the image, when I don't need it.
android
android-camera
null
null
null
null
open
How do I tell android that it doesn't need to compress the camera image? === When I take picture with android, I call camera.TakePicture(shutterCallback, rawCallback, postCallback, jpegCallback); However I only need the post-image data. So I call camera.TakePicture(null, null, postCallback, null); I want to take sequential pictures as quickly as possible. The android spec tells me I have to wait for the jpeg callback to finish before I call takePicture again (fair enough). But does this mean I *have* to add a jpegCallback and wait for it to be called? Is the compression an unskippable part of the `Camera.takepicture` process for android? It seems like a waste to have to wait for a compressed version of the image, when I don't need it.
0
11,385,019
07/08/2012 17:11:55
1,510,309
07/08/2012 16:59:40
1
0
How to get multiple values from jquery hash
How can i get multiple values in a jquery hash? Example: http://mysite.com/#l:value&v:id1212 same as but without page refresh http://mysite.com/?l=value&v=id1212 I thought something like: var hash = location.hash.replace(/^.*?#/, ''); var lVal = (/^l:/.test( hash )); var vVal = (/^v:/.test( hash )); but how can i fix that var lVal only reads untill the & sign? Am i on the right direction?
jquery
null
null
null
null
null
open
How to get multiple values from jquery hash === How can i get multiple values in a jquery hash? Example: http://mysite.com/#l:value&v:id1212 same as but without page refresh http://mysite.com/?l=value&v=id1212 I thought something like: var hash = location.hash.replace(/^.*?#/, ''); var lVal = (/^l:/.test( hash )); var vVal = (/^v:/.test( hash )); but how can i fix that var lVal only reads untill the & sign? Am i on the right direction?
0
11,386,698
07/08/2012 21:05:18
1,510,567
07/08/2012 21:01:59
1
0
What is wrong with my version of strchr? [C]
My assignment is to write my own version of strchr, yet it doesn't seem to work. Any advice would be much appreciated. Here it is: char *strchr (const char *s, int c) //we are looking for c on the string s { int dog; //This is the index on the string, initialized as 0 dog = 0; int point; //this is the pointer to the location given by the index point = &s[dog]; while ((s[dog] != c) && (s[dog] != '\0')) { //it keeps adding to dog until it stumbles upon either c or '\0' dog++; } if (s[dog]==c) { return point; //at this point, if this value is equal to c it returns the pointer to that location } else { return NULL; //if not, this means that c is not on the string } }
c
pointers
strchr
null
null
null
open
What is wrong with my version of strchr? [C] === My assignment is to write my own version of strchr, yet it doesn't seem to work. Any advice would be much appreciated. Here it is: char *strchr (const char *s, int c) //we are looking for c on the string s { int dog; //This is the index on the string, initialized as 0 dog = 0; int point; //this is the pointer to the location given by the index point = &s[dog]; while ((s[dog] != c) && (s[dog] != '\0')) { //it keeps adding to dog until it stumbles upon either c or '\0' dog++; } if (s[dog]==c) { return point; //at this point, if this value is equal to c it returns the pointer to that location } else { return NULL; //if not, this means that c is not on the string } }
0
11,386,701
07/08/2012 21:06:18
1,476,739
06/23/2012 11:57:06
11
0
C# client Python server : Connection refused
I'm working on a basic socket communication between C# (client) and Python (server), and I don't understand the reason why I've this error from the client: [ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException: Connection refused at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00159] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1262 at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/TcpClient.cs:284 at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x000b3] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/TcpClient.cs:355 My programs are really short and easy so I suppose it's a noob question, but I just don't get it. All I want is a Client sending a message to the server which will print it on the console. Here is the C# client (the error comes from :socket.Connect("localhost",9999);) using System; using System.Net.Sockets; namespace MyClient { class Client_Socket{ public void Publish(){ TcpClient socket = new TcpClient(); socket.Connect("localhost",9999); NetworkStream network = socket.GetStream(); System.IO.StreamWriter streamWriter= new System.IO.StreamWriter(network); streamWriter.WriteLine("MESSAGER HARGONIEN"); streamWriter.Flush(); network.Close(); } } } And the Python Server: from socket import * if __name__ == "__main__": while(1): PySocket = socket (AF_INET,SOCK_DGRAM) PySocket.bind (('localhost',9999)) Donnee, Client = PySocket.recvfrom (1024) print(Donnee) Thx for your help.
c#
python
sockets
communication
null
null
open
C# client Python server : Connection refused === I'm working on a basic socket communication between C# (client) and Python (server), and I don't understand the reason why I've this error from the client: [ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException: Connection refused at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00159] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1262 at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/TcpClient.cs:284 at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x000b3] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Net.Sockets/TcpClient.cs:355 My programs are really short and easy so I suppose it's a noob question, but I just don't get it. All I want is a Client sending a message to the server which will print it on the console. Here is the C# client (the error comes from :socket.Connect("localhost",9999);) using System; using System.Net.Sockets; namespace MyClient { class Client_Socket{ public void Publish(){ TcpClient socket = new TcpClient(); socket.Connect("localhost",9999); NetworkStream network = socket.GetStream(); System.IO.StreamWriter streamWriter= new System.IO.StreamWriter(network); streamWriter.WriteLine("MESSAGER HARGONIEN"); streamWriter.Flush(); network.Close(); } } } And the Python Server: from socket import * if __name__ == "__main__": while(1): PySocket = socket (AF_INET,SOCK_DGRAM) PySocket.bind (('localhost',9999)) Donnee, Client = PySocket.recvfrom (1024) print(Donnee) Thx for your help.
0
11,386,702
07/08/2012 21:06:20
113,197
05/27/2009 14:20:57
365
14
Cannot mask Stage3D SWF in Loader
Working in FlashBuilder, I build a mobile AS3 application that uses a Loader to display a local SWF file. It masks the loader so it only shows a 640x480 window. This worked fine using an old SWF file (a Flixel game, non-Stage3D). I then tried it with a Stage3D-enabled SWF file. This failed to run, because the application was not set to run in the 'direct' renderMode (it had been in auto up until this point). This allowed the application to run, but the SWF file now ignores the Loader's mask and displays across the entire stage. Is it not possible to mask Stage3D SWFs when loaded in this way? The loading looks like so: public function FlixelTest() { super(); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; myLoader.x = (stage.fullScreenWidth-640)/2; myLoader.y = (stage.fullScreenHeight-480)/2; var url:URLRequest = new URLRequest("stage3dswf.swf"); // in this case both SWFs are in the same folder myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete); myLoader.load(url); // load the SWF file addChild(myLoader); } private function loadProdComplete(e:Event):void{ var gameMask : Shape = new Shape; gameMask.graphics.beginFill(0xffcc00); gameMask.graphics.drawRect(myLoader.x,myLoader.y,640,480); gameMask.graphics.endFill(); myLoader.content.mask = gameMask; }
actionscript-3
flash
flash-builder
stage3d
null
null
open
Cannot mask Stage3D SWF in Loader === Working in FlashBuilder, I build a mobile AS3 application that uses a Loader to display a local SWF file. It masks the loader so it only shows a 640x480 window. This worked fine using an old SWF file (a Flixel game, non-Stage3D). I then tried it with a Stage3D-enabled SWF file. This failed to run, because the application was not set to run in the 'direct' renderMode (it had been in auto up until this point). This allowed the application to run, but the SWF file now ignores the Loader's mask and displays across the entire stage. Is it not possible to mask Stage3D SWFs when loaded in this way? The loading looks like so: public function FlixelTest() { super(); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; myLoader.x = (stage.fullScreenWidth-640)/2; myLoader.y = (stage.fullScreenHeight-480)/2; var url:URLRequest = new URLRequest("stage3dswf.swf"); // in this case both SWFs are in the same folder myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete); myLoader.load(url); // load the SWF file addChild(myLoader); } private function loadProdComplete(e:Event):void{ var gameMask : Shape = new Shape; gameMask.graphics.beginFill(0xffcc00); gameMask.graphics.drawRect(myLoader.x,myLoader.y,640,480); gameMask.graphics.endFill(); myLoader.content.mask = gameMask; }
0
11,372,644
07/07/2012 05:50:12
1,464,139
06/18/2012 15:44:14
70
0
How can I do take a substring and length of a string in C# if that string might be a null?
I have the following strings: var temp = null; var temp = ""; var temp = "12345678"; var temp = "1234567890"; What I need to do is if have a function that will give me the last four digits of the input variable if the input variable is 8 or 10 characters long. Otherwise I need it to return ""; Is there an easy way I can do this in C#. I am just not sure how to deal with null because if I get the length of null then I think that will give me an error.
c#
null
null
null
null
null
open
How can I do take a substring and length of a string in C# if that string might be a null? === I have the following strings: var temp = null; var temp = ""; var temp = "12345678"; var temp = "1234567890"; What I need to do is if have a function that will give me the last four digits of the input variable if the input variable is 8 or 10 characters long. Otherwise I need it to return ""; Is there an easy way I can do this in C#. I am just not sure how to deal with null because if I get the length of null then I think that will give me an error.
0
11,372,646
07/07/2012 05:50:17
1,420,778
05/28/2012 01:15:45
8
0
How to draw caret in the scroll view on iOS using system API?
I am working on an edit app, the view inherits from scroll view, and I draw most things manually. I need an insertion indicator, which may refer to caret(as I know windows use this term) or cursor(not the mouse cursor). I am not sure what term apple use. I googled before and I know I can draw it as a line manually, or create a clear background text view over it, but I don't like these ways. I hope there are system APIs to do this, which is more native. Any one can figure out?
ios
cursor
caret
null
null
null
open
How to draw caret in the scroll view on iOS using system API? === I am working on an edit app, the view inherits from scroll view, and I draw most things manually. I need an insertion indicator, which may refer to caret(as I know windows use this term) or cursor(not the mouse cursor). I am not sure what term apple use. I googled before and I know I can draw it as a line manually, or create a clear background text view over it, but I don't like these ways. I hope there are system APIs to do this, which is more native. Any one can figure out?
0
11,372,648
07/07/2012 05:50:28
1,047,842
11/15/2011 15:01:06
74
0
Temporary object not getting created when exception is caught by reference?
class Error1 { public: int errorcode; Error1(int x):errorcode(x){ cout<<"CTOR Error1"<<endl; } //Error1(Error1& obj ){ // errorcode = obj.errorcode; // cout<<"CopyCTOR Error1"<<endl; //} ~Error1(){cout<<"DTOR Error1"<<endl; } }; void fun() { cout<<"Inside fun"<<endl; throw(Error1(5)); } int main() { try{ fun(); } catch(Error1& eobj) { cout<<"Error1 type occured with code:"<<eobj.errorcode<<endl; } cin.get(); } OUTPUT: Inside fun CTOR Error1 DTOR Error1 Error1 type occured with code:5 DTOR Error1 This output indicates that a Error1 object is copy constructed for the catch handler. Since copy constructor is not defined for Error1 object default copy constructor is used. When i uncomment the commented section for defining a copy constructor i get the the following output. Inside fun CTOR Error1 Error1 type occured with code:5 DTOR Error1 Why is it that only one DTOR is getting called? Even if exception is caught by reference i believe a temporary is still created.
c++
visual-c++
null
null
null
null
open
Temporary object not getting created when exception is caught by reference? === class Error1 { public: int errorcode; Error1(int x):errorcode(x){ cout<<"CTOR Error1"<<endl; } //Error1(Error1& obj ){ // errorcode = obj.errorcode; // cout<<"CopyCTOR Error1"<<endl; //} ~Error1(){cout<<"DTOR Error1"<<endl; } }; void fun() { cout<<"Inside fun"<<endl; throw(Error1(5)); } int main() { try{ fun(); } catch(Error1& eobj) { cout<<"Error1 type occured with code:"<<eobj.errorcode<<endl; } cin.get(); } OUTPUT: Inside fun CTOR Error1 DTOR Error1 Error1 type occured with code:5 DTOR Error1 This output indicates that a Error1 object is copy constructed for the catch handler. Since copy constructor is not defined for Error1 object default copy constructor is used. When i uncomment the commented section for defining a copy constructor i get the the following output. Inside fun CTOR Error1 Error1 type occured with code:5 DTOR Error1 Why is it that only one DTOR is getting called? Even if exception is caught by reference i believe a temporary is still created.
0
11,372,649
07/07/2012 05:50:35
1,390,971
05/12/2012 11:18:50
14
0
How to add more button in TabBarController?
I am developing a application.. A small Problem is That,We use here a TabBarController Application. and We Add Some NavigationControllers in as Tab Menus, We Done Successfully. One Requirement is That in Last tabBarButton we Have add a More Button. But It Not a View. Just a simple button. When We Press These Button They Perform Some action. I Tried but Its Not Done From My Side. Have u Give Me Some Guidance.. Thanks In Advance..
iphone
null
null
null
null
null
open
How to add more button in TabBarController? === I am developing a application.. A small Problem is That,We use here a TabBarController Application. and We Add Some NavigationControllers in as Tab Menus, We Done Successfully. One Requirement is That in Last tabBarButton we Have add a More Button. But It Not a View. Just a simple button. When We Press These Button They Perform Some action. I Tried but Its Not Done From My Side. Have u Give Me Some Guidance.. Thanks In Advance..
0
11,372,650
07/07/2012 05:50:41
1,158,411
01/19/2012 11:58:28
6
0
QT Quick application running from command line
While I am trying to run Qt Quick desktop application exe from command line ,It is not showing anything except an plain empty window .but when i run from Qt creator, it works fine. Please let me know did i missed something?How to run qt quick projects from command line? Thanks, BR
qt
null
null
null
null
null
open
QT Quick application running from command line === While I am trying to run Qt Quick desktop application exe from command line ,It is not showing anything except an plain empty window .but when i run from Qt creator, it works fine. Please let me know did i missed something?How to run qt quick projects from command line? Thanks, BR
0
11,372,651
07/07/2012 05:50:52
1,508,303
07/07/2012 05:35:52
1
0
I forgot the name of my SharedPreferences file.
I forgot the name of a SharedPreferences file that I created a while back. My tablet is not rooted. Is there a way to view / list all SharedPreferences files ever created? If not, then it seems like I have a block of memory out there that I can never access again. 1. I have tried the adb shell >> navigate to package >> ls approach. But I am not rooted so I receive the response: "opendir failed, Permission denied" 2. I have looked around in my project directory as well as inside of eclipse, I cannot find any names of files that look like a sharedpreferences file. 3. I have hooked up my tablet to my PC via usb and searched around the file explorer from within windows, Android > data > does not list my project. What am I do to? How can I find out all of the names of past SharedPreferences files created?
android
sharedpreferences
null
null
null
null
open
I forgot the name of my SharedPreferences file. === I forgot the name of a SharedPreferences file that I created a while back. My tablet is not rooted. Is there a way to view / list all SharedPreferences files ever created? If not, then it seems like I have a block of memory out there that I can never access again. 1. I have tried the adb shell >> navigate to package >> ls approach. But I am not rooted so I receive the response: "opendir failed, Permission denied" 2. I have looked around in my project directory as well as inside of eclipse, I cannot find any names of files that look like a sharedpreferences file. 3. I have hooked up my tablet to my PC via usb and searched around the file explorer from within windows, Android > data > does not list my project. What am I do to? How can I find out all of the names of past SharedPreferences files created?
0
11,372,658
07/07/2012 05:52:36
1,508,317
07/07/2012 05:45:56
1
0
PERL recursive serach through directories to find .pl files, then run them and save their logs at the same directory
Hi can anyone help me out for a perl code I want a piece of perl code where it recursively searches through directories to find files with .pl extension and then run them in the same directory and save the logs there it self suppose D:krishna\try.pl D:kirishna\project\1.pl D:kirishna\project\2.pl are there Requirement: then our code should go to D krishna find th .pl file run it and save the log as try.log and then recursively got to D:kirishna\project and find 2 pl files run them thereitself and save the logs as 1.log and 2.log I want this code in perl ans it should run on win-7
perl
null
null
null
null
07/07/2012 08:24:37
not a real question
PERL recursive serach through directories to find .pl files, then run them and save their logs at the same directory === Hi can anyone help me out for a perl code I want a piece of perl code where it recursively searches through directories to find files with .pl extension and then run them in the same directory and save the logs there it self suppose D:krishna\try.pl D:kirishna\project\1.pl D:kirishna\project\2.pl are there Requirement: then our code should go to D krishna find th .pl file run it and save the log as try.log and then recursively got to D:kirishna\project and find 2 pl files run them thereitself and save the logs as 1.log and 2.log I want this code in perl ans it should run on win-7
1
11,372,667
07/07/2012 05:53:45
537,544
12/10/2010 07:55:07
3,630
141
Connection from Server to iPhone using Bonjour service over wifi
I am finding how to connect and retrieve files like images,pdf,etc.. from server to our iPhone. Actually I am not familiar with network services So really stuck in this problem. Currently I had gone through [this](http://stackoverflow.com/questions/3240617/cfnetwork-and-bonjour-integration-for-iphone-to-mac-integration),[this](http://www.saygoodnight.com/2010/09/bonjourvertise-bonjour-across-subnets) and [this](http://stackoverflow.com/questions/3752837/how-to-advertise-a-service-using-bonjour-across-subnets) and got many things but can't understand what they want to tell. My iPhone and Mac are under the common Wifi network. Though they all provides proper guidelines but Can anyone provide me some best solution about How can we connect our server and iPhone using one of this services. Please help me to solve this issue. Thanks & Regards, Mehul.
iphone
objective-c
ipad
bonjour
cfnetwork
null
open
Connection from Server to iPhone using Bonjour service over wifi === I am finding how to connect and retrieve files like images,pdf,etc.. from server to our iPhone. Actually I am not familiar with network services So really stuck in this problem. Currently I had gone through [this](http://stackoverflow.com/questions/3240617/cfnetwork-and-bonjour-integration-for-iphone-to-mac-integration),[this](http://www.saygoodnight.com/2010/09/bonjourvertise-bonjour-across-subnets) and [this](http://stackoverflow.com/questions/3752837/how-to-advertise-a-service-using-bonjour-across-subnets) and got many things but can't understand what they want to tell. My iPhone and Mac are under the common Wifi network. Though they all provides proper guidelines but Can anyone provide me some best solution about How can we connect our server and iPhone using one of this services. Please help me to solve this issue. Thanks & Regards, Mehul.
0
11,372,661
07/07/2012 05:53:21
1,492,615
06/30/2012 05:53:26
10
0
Magento Compilation Not enabling in Admin panel
I am tried to enable **"Compilation"** in magento admin panel. When i click enable button it shows "**Compiler include path is enabled**" meassage, But magento "**Compiler Status**" shows "**Disable"** and button shows "**enable**" option in top right. How to Fix this issue in admin panel? Please suggest me to solve this problem? Thanks
magento
null
null
null
null
null
open
Magento Compilation Not enabling in Admin panel === I am tried to enable **"Compilation"** in magento admin panel. When i click enable button it shows "**Compiler include path is enabled**" meassage, But magento "**Compiler Status**" shows "**Disable"** and button shows "**enable**" option in top right. How to Fix this issue in admin panel? Please suggest me to solve this problem? Thanks
0
11,372,663
07/07/2012 05:53:35
1,479,279
06/25/2012 07:15:55
10
0
Best Way to CRUD with Ajax in ASP.NET MVC3
I have a simple Table and need Edit - Save, New - Save And Delete with Ajax? What is your suggestion? what do you use in this issue?
ajax
asp.net-mvc
asp.net-mvc-3
crud
null
07/08/2012 04:44:39
not a real question
Best Way to CRUD with Ajax in ASP.NET MVC3 === I have a simple Table and need Edit - Save, New - Save And Delete with Ajax? What is your suggestion? what do you use in this issue?
1
11,372,672
07/07/2012 05:54:42
1,503,157
07/05/2012 06:57:15
1
2
How to read eclipse error
I program in visual studio and i love to use it. Because how the ide pinpoint the exact error of my code in csharp is superb. For example once i run a program and has a null exception the VS ide highlights it.Making it less time consuming on debugging.. However even though i would like to use VS as my ide in creating android, I cant. I can use mono for android but i would pay. SO, Can someone here explain how to pinpoint exactly the error in eclipse? for example like this.. 07-07 00:46:34.968: E/AndroidRuntime(401): FATAL EXCEPTION: main 07-07 00:46:34.968: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.localhost.one/com.localhost.one.Main}: java.lang.NullPointerException 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.os.Looper.loop(Looper.java:123) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-07 00:46:34.968: E/AndroidRuntime(401): at java.lang.reflect.Method.invokeNative(Native Method) 07-07 00:46:34.968: E/AndroidRuntime(401): at java.lang.reflect.Method.invoke(Method.java:521) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-07 00:46:34.968: E/AndroidRuntime(401): at dalvik.system.NativeStart.main(Native Method) 07-07 00:46:34.968: E/AndroidRuntime(401): Caused by: java.lang.NullPointerException 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONTokener.nextValue(JSONTokener.java:90) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONArray.<init>(JSONArray.java:87) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONArray.<init>(JSONArray.java:103) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.localhost.one.Main.onCreate(Main.java:80) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-07 00:46:34.968: E/AndroidRuntime(401): ... 11 more Eclipse ide is great for it has many plugins but it lacks of what VS has. If some one can tell me how to pinpoint exactly my error or where do i have my null pointer, from what variable, from what method in eclipse? thanks. Finding the error in eclipse is very time consuming in eclipse..
eclipse
null
null
null
null
null
open
How to read eclipse error === I program in visual studio and i love to use it. Because how the ide pinpoint the exact error of my code in csharp is superb. For example once i run a program and has a null exception the VS ide highlights it.Making it less time consuming on debugging.. However even though i would like to use VS as my ide in creating android, I cant. I can use mono for android but i would pay. SO, Can someone here explain how to pinpoint exactly the error in eclipse? for example like this.. 07-07 00:46:34.968: E/AndroidRuntime(401): FATAL EXCEPTION: main 07-07 00:46:34.968: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.localhost.one/com.localhost.one.Main}: java.lang.NullPointerException 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.os.Looper.loop(Looper.java:123) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-07 00:46:34.968: E/AndroidRuntime(401): at java.lang.reflect.Method.invokeNative(Native Method) 07-07 00:46:34.968: E/AndroidRuntime(401): at java.lang.reflect.Method.invoke(Method.java:521) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-07 00:46:34.968: E/AndroidRuntime(401): at dalvik.system.NativeStart.main(Native Method) 07-07 00:46:34.968: E/AndroidRuntime(401): Caused by: java.lang.NullPointerException 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONTokener.nextValue(JSONTokener.java:90) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONArray.<init>(JSONArray.java:87) 07-07 00:46:34.968: E/AndroidRuntime(401): at org.json.JSONArray.<init>(JSONArray.java:103) 07-07 00:46:34.968: E/AndroidRuntime(401): at com.localhost.one.Main.onCreate(Main.java:80) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-07 00:46:34.968: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-07 00:46:34.968: E/AndroidRuntime(401): ... 11 more Eclipse ide is great for it has many plugins but it lacks of what VS has. If some one can tell me how to pinpoint exactly my error or where do i have my null pointer, from what variable, from what method in eclipse? thanks. Finding the error in eclipse is very time consuming in eclipse..
0
11,280,095
07/01/2012 06:46:11
584,018
01/21/2011 05:51:03
86
0
why jquey code not called here...please suggest?
Below all my code, **Model ** Below is Model code, public class MyViewModel { public int? Year { get; set; } public int? Month { get; set; } public IEnumerable<SelectListItem> Years { get { return Enumerable.Range(2000, 12).Select(x => new SelectListItem { Value = x.ToString(), Text = x.ToString() }); } } } **Controller** Below is Controller code, // // GET: /MenuSix/ public ActionResult Index() { var model = new MyViewModel(); return View(model); } public ActionResult Months(int year) { if (year == 2011) { return Json( Enumerable.Range(1, 3).Select(x => new { value = x, text = x }), JsonRequestBehavior.AllowGet ); } return Json( Enumerable.Range(1, 12).Select(x => new { value = x, text = x }), JsonRequestBehavior.AllowGet ); } **View** Below is View code, @model DemoWeb.Models.MenuSix.MyViewModel @using (Html.BeginForm()) { @Html.DropDownListFor( x => x.Year, new SelectList(Model.Years, "Value", "Text"), "-- select year --" ) @Html.DropDownListFor( x => x.Month, Enumerable.Empty<SelectListItem>(), "-- select month --" ) } @section PageScriptsAndCSS{ <script type="text/javascript"> $('#Year').change(function () { debugger; var selectedYear = $(this).val(); if (selectedYear != null && selectedYear != '') { $.getJSON('@Url.Action("Months")', { year: selectedYear }, function (months) { var monthsSelect = $('#Month'); monthsSelect.empty(); $.each(months, function (index, month) { monthsSelect.append($('<option/>', { value: month.value, text: month.text })); }); }); } }); </script> } I'm testing above code, but in jquery code not called here, please suggest why the dropdown change event not called in jquery?
asp.net
asp.net-mvc-3
jquery-ajax
null
null
null
open
why jquey code not called here...please suggest? === Below all my code, **Model ** Below is Model code, public class MyViewModel { public int? Year { get; set; } public int? Month { get; set; } public IEnumerable<SelectListItem> Years { get { return Enumerable.Range(2000, 12).Select(x => new SelectListItem { Value = x.ToString(), Text = x.ToString() }); } } } **Controller** Below is Controller code, // // GET: /MenuSix/ public ActionResult Index() { var model = new MyViewModel(); return View(model); } public ActionResult Months(int year) { if (year == 2011) { return Json( Enumerable.Range(1, 3).Select(x => new { value = x, text = x }), JsonRequestBehavior.AllowGet ); } return Json( Enumerable.Range(1, 12).Select(x => new { value = x, text = x }), JsonRequestBehavior.AllowGet ); } **View** Below is View code, @model DemoWeb.Models.MenuSix.MyViewModel @using (Html.BeginForm()) { @Html.DropDownListFor( x => x.Year, new SelectList(Model.Years, "Value", "Text"), "-- select year --" ) @Html.DropDownListFor( x => x.Month, Enumerable.Empty<SelectListItem>(), "-- select month --" ) } @section PageScriptsAndCSS{ <script type="text/javascript"> $('#Year').change(function () { debugger; var selectedYear = $(this).val(); if (selectedYear != null && selectedYear != '') { $.getJSON('@Url.Action("Months")', { year: selectedYear }, function (months) { var monthsSelect = $('#Month'); monthsSelect.empty(); $.each(months, function (index, month) { monthsSelect.append($('<option/>', { value: month.value, text: month.text })); }); }); } }); </script> } I'm testing above code, but in jquery code not called here, please suggest why the dropdown change event not called in jquery?
0
11,280,099
07/01/2012 06:47:01
1,322,916
04/10/2012 00:01:30
5
0
line of error appears when passing a message in php
i been working in the login code .. it works fine except this message that appears when openenig the login page !! " Notice: Undefined index: msg in C:\xampp\htdocs\thesite\login.php on line 103 " it has appeard when i typed this in loginExcution.php else { //Login failed header("location:login.php? msg=*invalid name or password"); exit(); } and this to show the message in the login form page <?php $msg = $_GET['msg']; print $msg; ?>
php
null
null
null
null
null
open
line of error appears when passing a message in php === i been working in the login code .. it works fine except this message that appears when openenig the login page !! " Notice: Undefined index: msg in C:\xampp\htdocs\thesite\login.php on line 103 " it has appeard when i typed this in loginExcution.php else { //Login failed header("location:login.php? msg=*invalid name or password"); exit(); } and this to show the message in the login form page <?php $msg = $_GET['msg']; print $msg; ?>
0
3,841,191
10/01/2010 16:34:15
213,968
11/18/2009 17:57:34
35
2
Downloading a video in an iPhone app, is there any file size limit?
I am trying to work out if I can have my app download a couple videos that may change from time to time. It all seems possible in my research, but my one concern is if the size of the video file would be an issue? They are not going to be extremely large, but they are videos and from what I see they may have to go through the memory before saving to the storage. Any pointers, advice, or thoughts would be greatly appreciated, thank you!
iphone
video
download
null
null
null
open
Downloading a video in an iPhone app, is there any file size limit? === I am trying to work out if I can have my app download a couple videos that may change from time to time. It all seems possible in my research, but my one concern is if the size of the video file would be an issue? They are not going to be extremely large, but they are videos and from what I see they may have to go through the memory before saving to the storage. Any pointers, advice, or thoughts would be greatly appreciated, thank you!
0
11,279,788
07/01/2012 05:23:56
1,124,893
01/01/2012 06:14:45
11
1
What assembler would be best fit to program an OS from scratch, with execution performance prioritized?
**I am not fit to program an OS under any circumstances, but this is hypothetical.** I want to create a simple operating system from almost absolute scratch in assembly language. With great ambitions in mind, I want it to be as optimized as possible for execution. I also want the code to be fairly portable for multiple architectures (especially x86 and x64 interchangeably). I feel a bit minimalist, so lets toss out software "bloat". What I am looking for is an assembler that can fit this criteria. Obviously, I want one that is decently documented officially or unofficially, and I need it to be decently well-known (I.E. I don't want "ΣASM" found in the middle of the internet Sahara.)
performance
assembly
operating-system
language
portability
07/01/2012 08:04:01
not constructive
What assembler would be best fit to program an OS from scratch, with execution performance prioritized? === **I am not fit to program an OS under any circumstances, but this is hypothetical.** I want to create a simple operating system from almost absolute scratch in assembly language. With great ambitions in mind, I want it to be as optimized as possible for execution. I also want the code to be fairly portable for multiple architectures (especially x86 and x64 interchangeably). I feel a bit minimalist, so lets toss out software "bloat". What I am looking for is an assembler that can fit this criteria. Obviously, I want one that is decently documented officially or unofficially, and I need it to be decently well-known (I.E. I don't want "ΣASM" found in the middle of the internet Sahara.)
4
11,279,790
07/01/2012 05:24:29
1,492,837
06/30/2012 10:00:11
6
0
(Java) How to show image in JOptionPane in netbeans
The code i used in JGrasp to show the image is not working in Netbeans The code i used in JGrasp is final ImageIcon icon1 = new ImageIcon("image/money.gif"); JOptionPane.showMessageDialog(null, " blah blah", "Text", JOptionPane.INFORMATION_MESSAGE, icon1); And if i wanted to show an image in JOptionPane.showInputDialog would it be the same for JOptionPane.showMessageDialog ? Any help is greatly appreciated!
java
netbeans
null
null
null
null
open
(Java) How to show image in JOptionPane in netbeans === The code i used in JGrasp to show the image is not working in Netbeans The code i used in JGrasp is final ImageIcon icon1 = new ImageIcon("image/money.gif"); JOptionPane.showMessageDialog(null, " blah blah", "Text", JOptionPane.INFORMATION_MESSAGE, icon1); And if i wanted to show an image in JOptionPane.showInputDialog would it be the same for JOptionPane.showMessageDialog ? Any help is greatly appreciated!
0
11,280,102
07/01/2012 06:47:55
1,442,564
06/07/2012 15:08:07
9
3
What programming languages are installed by default on Windows 7?
I was planning on learning a way to create my own programming language and I wanted to know what language to write a compiler with. C? C++?
windows
compiler
null
null
null
null
open
What programming languages are installed by default on Windows 7? === I was planning on learning a way to create my own programming language and I wanted to know what language to write a compiler with. C? C++?
0
11,280,105
07/01/2012 06:48:49
406,457
07/30/2010 06:30:03
348
15
how to naviagate from one js page to another js page on click button
I am fresher in titanium for mac os x. I am using titanium first time and do not have any knowledge on js pages and action event's I am setup titanium and add button from that button i need to navigate to another js page var btn = Ti.UI.createButton({ left:10, top:100, height:'40', width:'80', title:'login', color:'auto' } ) self.add(lbl); btn.addEventListener('click',function() { } ) let example consider second jsp page is login.js page when i click button i need to login.js page with navigation effect! @ thanks in advance
titanium
null
null
null
null
null
open
how to naviagate from one js page to another js page on click button === I am fresher in titanium for mac os x. I am using titanium first time and do not have any knowledge on js pages and action event's I am setup titanium and add button from that button i need to navigate to another js page var btn = Ti.UI.createButton({ left:10, top:100, height:'40', width:'80', title:'login', color:'auto' } ) self.add(lbl); btn.addEventListener('click',function() { } ) let example consider second jsp page is login.js page when i click button i need to login.js page with navigation effect! @ thanks in advance
0
11,280,106
07/01/2012 06:48:52
1,400,041
05/17/2012 03:20:07
11
0
Missing "search dependecy for..." option after installing m2eclipse and enabling the full repository index
Title says it all. I installed m2eclipse plugin in eclipse indigo and right clicked the global repository choose "full index", waited 2 mins for the indexing to complete and the i typed in the editor someething like " Testcl nn = ". If i hover on the Testcl text i get a popup with options and it's missin the search dependecy option. How can i fix this? Regards, JudeO
eclipse
maven
m2eclipse
null
null
null
open
Missing "search dependecy for..." option after installing m2eclipse and enabling the full repository index === Title says it all. I installed m2eclipse plugin in eclipse indigo and right clicked the global repository choose "full index", waited 2 mins for the indexing to complete and the i typed in the editor someething like " Testcl nn = ". If i hover on the Testcl text i get a popup with options and it's missin the search dependecy option. How can i fix this? Regards, JudeO
0
11,400,937
07/09/2012 18:28:33
1,151,609
01/16/2012 10:00:34
1
0
File.Exists false when created by tesseract
I use tesseract to get text from captcha image. I use this code Process p = new Process(); p.StartInfo.FileName = Server.MapPath("~/app/tesseract.exe"); p.StartInfo.Arguments = imgSavePath + " " + txtSavePath; p.Start(); p.WaitForExit(); bool exist = File.Exists(txtSavePath); The **txtSavePath** is created in windows explorer, i can open it and can read the text in it. But the **exist** variable is **false**. It is so strange. Can anybody tell me why? How can i use **StreamReader** to read text in created file?
captcha
tesseract
file.exists
null
null
null
open
File.Exists false when created by tesseract === I use tesseract to get text from captcha image. I use this code Process p = new Process(); p.StartInfo.FileName = Server.MapPath("~/app/tesseract.exe"); p.StartInfo.Arguments = imgSavePath + " " + txtSavePath; p.Start(); p.WaitForExit(); bool exist = File.Exists(txtSavePath); The **txtSavePath** is created in windows explorer, i can open it and can read the text in it. But the **exist** variable is **false**. It is so strange. Can anybody tell me why? How can i use **StreamReader** to read text in created file?
0
11,400,952
07/09/2012 18:29:39
567,607
03/24/2010 16:54:00
1
0
Running rake commands in cloudfoundry
I am using cloudfoundry to deploy a rails 3.1 app. Is there a way to run common rake commands, like for e.g. rake db:reset?
cloudfoundry
null
null
null
null
null
open
Running rake commands in cloudfoundry === I am using cloudfoundry to deploy a rails 3.1 app. Is there a way to run common rake commands, like for e.g. rake db:reset?
0
11,400,790
07/09/2012 18:18:39
1,004,278
10/20/2011 00:53:10
800
8
Is there an improved IDE for Eclipse?
I am looking for a modern, highly usable, single package IDE/wrapper for Eclipse (if such things exist). Something that would provide a wrapper to Eclipse and add some style, a nicer interface, better code highlighting, etc. Any suggestions?
eclipse
ide
null
null
null
07/10/2012 03:17:02
not constructive
Is there an improved IDE for Eclipse? === I am looking for a modern, highly usable, single package IDE/wrapper for Eclipse (if such things exist). Something that would provide a wrapper to Eclipse and add some style, a nicer interface, better code highlighting, etc. Any suggestions?
4
11,400,964
07/09/2012 18:30:40
1,273,413
03/16/2012 07:04:55
76
6
How resource heavy is a Timer?
I'm running a timer like this: private void InitializeTimer() { Timer myTimer = new Timer(); myTimer.Interval = 3000; myTimer.Enabled = true; myTimer.Tick += new EventHandler(TimerEventProcessor); myTimer.Start(); } It will trigger an event every 3rd second. The event is not very heavy I think, it is reading text from a file, comparing text length to the text in a textbox and will replace the text in the box if it has more characters. But how resource heavy is the timer? And is it a bad idea to read text from a file every 3rd second (the file is a log file in plain text).
c#
timer
null
null
null
null
open
How resource heavy is a Timer? === I'm running a timer like this: private void InitializeTimer() { Timer myTimer = new Timer(); myTimer.Interval = 3000; myTimer.Enabled = true; myTimer.Tick += new EventHandler(TimerEventProcessor); myTimer.Start(); } It will trigger an event every 3rd second. The event is not very heavy I think, it is reading text from a file, comparing text length to the text in a textbox and will replace the text in the box if it has more characters. But how resource heavy is the timer? And is it a bad idea to read text from a file every 3rd second (the file is a log file in plain text).
0
11,400,968
07/09/2012 18:30:55
1,456,914
06/14/2012 17:34:58
792
11
better solution for selecting updating many values
I want to update some values within a column based on different situations..... the table has the following details like..... Date date period int subcode varchar(3) status_bits varchar(100) // status bits resemble an information based code based...the data usually stored are 2343211 where each value in digits represent an information..... ***Now i've got to update these values based on different dates and periods.... Now considering the `java program`......*** i have stored the details in corresponding variables in java like.. java.util.Date date[]; int period[]; String subcode[]; // Here for an index i , they share the same values within a row..... If i wanna update it in such a way that that i want to change the 5th letter in a varchar for different dates,periods and subcodes(combined)..... now..i've currently performed like this... Connection con; preparedStatement ps; String bitstatus; for(i=0; i < noofupdates; i++) { ps = con.prepareStatement("select status_bits from tablename where Date = ? AND period = ? AND subcode = ? limit 0,1"); ps.setDate(1,date[i]); ps.setInt(2,period[i])' ps.setString(3,subcode[i]); rs=ps.executeQuery(); while(rs.next()) { bitstatus = rs.getString(1); // performed operation to update the bit..... ps=con.prepareStatment("update status_bits correspondind to the same date,field and subcode"); ps.executeUpdate(); } } **Now i presume you understand from the program that i want to update status_bits in the table based on different dates and periods where the bit operation is common**......Now i really know that these method is hammering lots of queries and seriously affecting mysql performance...So plz help me by providing a much alternate idea to this.......there are around 1000 records to update.........
java
mysql
database-design
null
null
null
open
better solution for selecting updating many values === I want to update some values within a column based on different situations..... the table has the following details like..... Date date period int subcode varchar(3) status_bits varchar(100) // status bits resemble an information based code based...the data usually stored are 2343211 where each value in digits represent an information..... ***Now i've got to update these values based on different dates and periods.... Now considering the `java program`......*** i have stored the details in corresponding variables in java like.. java.util.Date date[]; int period[]; String subcode[]; // Here for an index i , they share the same values within a row..... If i wanna update it in such a way that that i want to change the 5th letter in a varchar for different dates,periods and subcodes(combined)..... now..i've currently performed like this... Connection con; preparedStatement ps; String bitstatus; for(i=0; i < noofupdates; i++) { ps = con.prepareStatement("select status_bits from tablename where Date = ? AND period = ? AND subcode = ? limit 0,1"); ps.setDate(1,date[i]); ps.setInt(2,period[i])' ps.setString(3,subcode[i]); rs=ps.executeQuery(); while(rs.next()) { bitstatus = rs.getString(1); // performed operation to update the bit..... ps=con.prepareStatment("update status_bits correspondind to the same date,field and subcode"); ps.executeUpdate(); } } **Now i presume you understand from the program that i want to update status_bits in the table based on different dates and periods where the bit operation is common**......Now i really know that these method is hammering lots of queries and seriously affecting mysql performance...So plz help me by providing a much alternate idea to this.......there are around 1000 records to update.........
0
11,400,946
07/09/2012 18:28:56
1,512,440
07/09/2012 15:34:43
3
0
sql select count for more than 1 like
I want to do something like: SELECT count(TableName.DeviceName where DeviceName like 'AR%' ) as DEVICE_Type_A, count(TableName.DeviceName where DeviceName like 'R%' ) as DEVICE_Type_B, count(TableName.DeviceName where DeviceName like 'P%' ) as DEVICE_Type_C, count(TableName.DeviceName where DeviceName like 'AM%' ) as DEVICE_Type_D, FROM DB.TableName TableName WHERE TableName.DURATIONMIN > '180' Thanks
mysql
sql
sql-select
null
null
null
open
sql select count for more than 1 like === I want to do something like: SELECT count(TableName.DeviceName where DeviceName like 'AR%' ) as DEVICE_Type_A, count(TableName.DeviceName where DeviceName like 'R%' ) as DEVICE_Type_B, count(TableName.DeviceName where DeviceName like 'P%' ) as DEVICE_Type_C, count(TableName.DeviceName where DeviceName like 'AM%' ) as DEVICE_Type_D, FROM DB.TableName TableName WHERE TableName.DURATIONMIN > '180' Thanks
0
11,541,171
07/18/2012 12:17:13
1,534,715
07/18/2012 12:04:03
1
0
How to lock tables with codeigniter?
I have to run this sql routine in a model: $this->db->query('LOCK TABLE orders WRITE'); $this->db->query('TRUNCATE TABLE orders'); $this->db->query('INSERT INTO orders SELECT * FROM orders_tmp'); $this->db->query('UNLOCK TABLES'); but I get this error: Error Number: 1192 Impossible to execute the requested command: tables under lock or transaction running TRUNCATE TABLE orders I use MyISAM as DB engine on this table. Could you please help me??? thanx.
mysql
codeigniter
table
locking
null
null
open
How to lock tables with codeigniter? === I have to run this sql routine in a model: $this->db->query('LOCK TABLE orders WRITE'); $this->db->query('TRUNCATE TABLE orders'); $this->db->query('INSERT INTO orders SELECT * FROM orders_tmp'); $this->db->query('UNLOCK TABLES'); but I get this error: Error Number: 1192 Impossible to execute the requested command: tables under lock or transaction running TRUNCATE TABLE orders I use MyISAM as DB engine on this table. Could you please help me??? thanx.
0
11,541,173
07/18/2012 12:17:19
274,344
02/16/2010 12:24:15
2,436
120
Why are these Hazelcast warnings appearing?
I'm using Hazelcast to cache a JMS topic. Everything works great up to a point. After about 30-40 minutes of runtime I start getting : WARNING: [192.168.3.102]:5701 [devGroup] RedoLog{key=Data{partitionHash=-1465305045} size= 10, operation=CONCURRENT_MAP_PUT_IF_ABSENT, target=Address[192.168.3.102]:5701, targetConnected=false, redoCount=910, migrating=null partition=Partition [186]{ 0:Address[192.168.3.102]:5701 } } As much as I understood from reading dev forums these are Redo warnings meaning that Hazelcast can not connect to the specified instance `target=Address[192.168.3.102]:5701` to distribute the cache. The odd thing however is that my configuration has only one node, which is the current server instance: INFO: [192.168.3.102]:5701 [devGroup] Members [1] { Member [192.168.3.102]:5701 this } I'm using spring to configure it: <hz:hazelcast id="hazelcastInstance"> <hz:config> <hz:group name="devGroup" password="pass"/> <hz:properties> <hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property> <hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property> </hz:properties> <hz:network port="5701" port-auto-increment="true"> <hz:join> <hz:multicast enabled="false" /> <hz:tcp-ip enabled="true"> <hz:members>192.168.3.102</hz:members> </hz:tcp-ip> </hz:join> <hz:symmetric-encryption enabled="true" algorithm="PBEWithMD5AndDES" salt="thesalt" password="thepass" iteration-count="19"/> <hz:asymmetric-encryption enabled="false" key-password="thekeypass" key-alias="local" store-type="JKS" store-password="thestorepass" store-path="keystore"/> </hz:network> </hz:config> </hz:hazelcast> I'm using Hazelcast 2.1, Spring 3.1 and Tomcat 7 So does anyone know why I'm getting the warnings ? Thanks,
java
spring
tomcat
hazelcast
null
null
open
Why are these Hazelcast warnings appearing? === I'm using Hazelcast to cache a JMS topic. Everything works great up to a point. After about 30-40 minutes of runtime I start getting : WARNING: [192.168.3.102]:5701 [devGroup] RedoLog{key=Data{partitionHash=-1465305045} size= 10, operation=CONCURRENT_MAP_PUT_IF_ABSENT, target=Address[192.168.3.102]:5701, targetConnected=false, redoCount=910, migrating=null partition=Partition [186]{ 0:Address[192.168.3.102]:5701 } } As much as I understood from reading dev forums these are Redo warnings meaning that Hazelcast can not connect to the specified instance `target=Address[192.168.3.102]:5701` to distribute the cache. The odd thing however is that my configuration has only one node, which is the current server instance: INFO: [192.168.3.102]:5701 [devGroup] Members [1] { Member [192.168.3.102]:5701 this } I'm using spring to configure it: <hz:hazelcast id="hazelcastInstance"> <hz:config> <hz:group name="devGroup" password="pass"/> <hz:properties> <hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property> <hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property> </hz:properties> <hz:network port="5701" port-auto-increment="true"> <hz:join> <hz:multicast enabled="false" /> <hz:tcp-ip enabled="true"> <hz:members>192.168.3.102</hz:members> </hz:tcp-ip> </hz:join> <hz:symmetric-encryption enabled="true" algorithm="PBEWithMD5AndDES" salt="thesalt" password="thepass" iteration-count="19"/> <hz:asymmetric-encryption enabled="false" key-password="thekeypass" key-alias="local" store-type="JKS" store-password="thestorepass" store-path="keystore"/> </hz:network> </hz:config> </hz:hazelcast> I'm using Hazelcast 2.1, Spring 3.1 and Tomcat 7 So does anyone know why I'm getting the warnings ? Thanks,
0
11,541,186
07/18/2012 12:17:56
1,498,136
07/03/2012 08:16:34
3
0
Copying All the visible Rows in the current sheet and pasting it to another sheet
Hy. i have a sheet on which i have created a list and a filter is set. when i choose some values from that list then certain values are shown(visible) and the rest is hidden. I just want to copy all the visible data(including all visible rows) from that sheet to another workbook. i have used some code but it only selects first cell of the sheet. and i need All the visible rows to be copied to another workbook Range("A1").Select do ActiveCell.offset(1,0).Select Loop While ActiveCell.EntireRow.Hidden = True Bingo That's All. waiting for the answer its urgent.
excel-vba
macros
null
null
null
null
open
Copying All the visible Rows in the current sheet and pasting it to another sheet === Hy. i have a sheet on which i have created a list and a filter is set. when i choose some values from that list then certain values are shown(visible) and the rest is hidden. I just want to copy all the visible data(including all visible rows) from that sheet to another workbook. i have used some code but it only selects first cell of the sheet. and i need All the visible rows to be copied to another workbook Range("A1").Select do ActiveCell.offset(1,0).Select Loop While ActiveCell.EntireRow.Hidden = True Bingo That's All. waiting for the answer its urgent.
0
11,650,164
07/25/2012 12:52:49
1,518,070
07/11/2012 14:22:46
222
2
Highlight correct letter to be completed
In my drag and drop game I have currently got a style that shows the user what word to spell but it has no constraint to make sure that they don't drop a letter anywhere else but that first cell of the first word. How would I go making surethe user can only drop a letter in the first letter of the word? Here is the code that applies the style to the word to spell... $('#pickNext').click(function() { // remove the class from all td's $('td').removeClass('spellword'); // pick a random word rndWord = shuffledWords.sort(function() { return 0.8 - Math.random(); })[0]; // apply class to all cells containing a letter from that word $('td[data-word="' + rndWord + '"]').addClass('spellword'); }); Here is the script for my drag and drops... $('.drag').draggable({ helper: 'clone', snap: '.drop', grid: [60, 60], revert: function(droppable) { if (droppable === false) { return true; } else { return false; } } }); $(".drop").droppable({ drop: function(event, ui) { word = $(this).data('word'); guesses[word].push($(ui.draggable).attr('data-letter')); console.log($(event)); console.log($(ui.draggable).text()); console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim()); if ($(this).text() == $(ui.draggable).text().trim()) { $(this).addClass('wordglow3'); } else { $(this).addClass('wordglow'); } console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim()); console.log(guesses); if (guesses[word].length == 3) { if (guesses[word].join('') == word) { $('td[data-word=' + word + ']').addClass('wordglow2'); } else { $('td[data-word=' + word + ']').addClass("wordglow4"); guesses[word].splice(0, guesses[word].length); } } }, The style to be applied will be... .spellLetter { -webkit-box-shadow: inset 20px 0px 10px 5px #176BC9; box-shadow: inset 0px 0px 10px 5px #176BC9; }
javascript
jquery
jquery-ui
drag-and-drop
null
null
open
Highlight correct letter to be completed === In my drag and drop game I have currently got a style that shows the user what word to spell but it has no constraint to make sure that they don't drop a letter anywhere else but that first cell of the first word. How would I go making surethe user can only drop a letter in the first letter of the word? Here is the code that applies the style to the word to spell... $('#pickNext').click(function() { // remove the class from all td's $('td').removeClass('spellword'); // pick a random word rndWord = shuffledWords.sort(function() { return 0.8 - Math.random(); })[0]; // apply class to all cells containing a letter from that word $('td[data-word="' + rndWord + '"]').addClass('spellword'); }); Here is the script for my drag and drops... $('.drag').draggable({ helper: 'clone', snap: '.drop', grid: [60, 60], revert: function(droppable) { if (droppable === false) { return true; } else { return false; } } }); $(".drop").droppable({ drop: function(event, ui) { word = $(this).data('word'); guesses[word].push($(ui.draggable).attr('data-letter')); console.log($(event)); console.log($(ui.draggable).text()); console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim()); if ($(this).text() == $(ui.draggable).text().trim()) { $(this).addClass('wordglow3'); } else { $(this).addClass('wordglow'); } console.log('CHECKING : ' + $(this).text() + ' against ' + $(ui.draggable).text().trim()); console.log(guesses); if (guesses[word].length == 3) { if (guesses[word].join('') == word) { $('td[data-word=' + word + ']').addClass('wordglow2'); } else { $('td[data-word=' + word + ']').addClass("wordglow4"); guesses[word].splice(0, guesses[word].length); } } }, The style to be applied will be... .spellLetter { -webkit-box-shadow: inset 20px 0px 10px 5px #176BC9; box-shadow: inset 0px 0px 10px 5px #176BC9; }
0
11,650,040
07/25/2012 12:45:40
616,217
05/29/2010 04:45:28
56
1
To Show only Last 7 days from Todays Date using jQuery UI Datepicker
Can anyone please help, to show only last 7 days from Today's date with using jQuery UI Picker. Thanks in Advance.
jquery
jquery-ui
jquery-ui-datepicker
null
null
null
open
To Show only Last 7 days from Todays Date using jQuery UI Datepicker === Can anyone please help, to show only last 7 days from Today's date with using jQuery UI Picker. Thanks in Advance.
0
11,650,041
07/25/2012 12:45:41
1,498,224
07/03/2012 08:54:31
1
0
how to make a snapshot using directshownet
My application needs video frames from webcam, not live stream. How to grab them using directshow? ISampleGrabber interface doesn't work, it crashes when i trying to create SampleGrabber instance.
c#
directshow.net
null
null
null
null
open
how to make a snapshot using directshownet === My application needs video frames from webcam, not live stream. How to grab them using directshow? ISampleGrabber interface doesn't work, it crashes when i trying to create SampleGrabber instance.
0
11,650,042
07/25/2012 12:45:50
498,727
11/05/2010 19:41:55
217
0
Writing comman line comman output to a file with in Java
I am running a command line command from java: The command: ping localhost > output.txt The command is send via a Java like this: Process pr = rt.exec(command); For some reason the file is not created, but when i run this command on command line itself, the file does create and the output is in that file. Whay does the java command dont create the file? Thanks.
java
command-line
null
null
null
null
open
Writing comman line comman output to a file with in Java === I am running a command line command from java: The command: ping localhost > output.txt The command is send via a Java like this: Process pr = rt.exec(command); For some reason the file is not created, but when i run this command on command line itself, the file does create and the output is in that file. Whay does the java command dont create the file? Thanks.
0
11,650,044
07/25/2012 12:45:55
1,236,937
02/28/2012 02:35:04
6
0
Google Maps API V3 Custom Control with Google Adsense?
I'm pretty new to javascript so please be gentle ;) I'm using Google Maps API V3 and creating a custom control as per this example. It's pretty straight forward as it's the example from Google. What I'm having trouble with though is replacing the .innerHTML with an existing DIV containing javascript. Ultimately, I'm trying to create a custom control on my Google Map that contains a Google Adsense ad. Normally I would create a div in my HTML after the body tag and that would contain the javascript code for the Google Adsense Ad. Normally I would use controlText.innerHTML = 'some html goes here'; for the custom control, but in my case I want to use an existing DIV that contains the javascript code for the Google Adsense ad. I've tried replacing controlText.innerHTML = 'some html goes here'; with controlText.innerHTML = document.getElementById("verticalad"); but it just breaks the map. Can anyone suggest what I'm doing wrong? I'm hoping it's pretty straight forward to fix. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Google Maps JavaScript API v3 Example: Custom Controls</title> <link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet"> <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> <script> var map; var chicago = new google.maps.LatLng(41.850033, -87.6500523); function HomeControl(controlDiv, map) { controlDiv.style.padding = '4px'; var controlUI = document.createElement('div'); controlUI.style.backgroundColor = 'white'; controlUI.style.borderStyle = 'solid'; controlUI.style.borderWidth = '2px'; controlUI.style.cursor = 'pointer'; controlUI.style.textAlign = 'center'; controlUI.title = 'Click to set the map to Home'; controlDiv.appendChild(controlUI); var controlText = document.createElement('div'); controlText.style.fontFamily = 'Arial,sans-serif'; controlText.style.fontSize = '12px'; controlText.style.paddingLeft = '4px'; controlText.style.paddingRight = '4px'; //**********************************************************************// //Normally this would be controlText.innerHTML = 'some html goes here'; //**********************************************************************// controlText.innerHTML = document.getElementById("verticalad"); controlUI.appendChild(controlText); google.maps.event.addDomListener(controlUI, 'click', function() { map.setCenter(chicago) }); } function initialize() { var mapDiv = document.getElementById('map_canvas'); var mapOptions = { zoom: 12, center: chicago, mapTypeId: google.maps.MapTypeId.TERRAIN, streetViewControl: false, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.RIGHT_BOTTOM } } map = new google.maps.Map(mapDiv, mapOptions); var homeControlDiv = document.createElement('div'); var homeControl = new HomeControl(homeControlDiv, map); homeControlDiv.index = 1; map.controls[google.maps.ControlPosition.LEFT_CENTER].push(homeControlDiv); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:100%;height:700px;"></div> //**************************************************************** // This is the div that needs to be in the custom control //**************************************************************** <div id="verticalad"><script type="text/javascript">adsense code goes here</script></div> </body> </html>
google-maps-api-3
adsense
null
null
null
null
open
Google Maps API V3 Custom Control with Google Adsense? === I'm pretty new to javascript so please be gentle ;) I'm using Google Maps API V3 and creating a custom control as per this example. It's pretty straight forward as it's the example from Google. What I'm having trouble with though is replacing the .innerHTML with an existing DIV containing javascript. Ultimately, I'm trying to create a custom control on my Google Map that contains a Google Adsense ad. Normally I would create a div in my HTML after the body tag and that would contain the javascript code for the Google Adsense Ad. Normally I would use controlText.innerHTML = 'some html goes here'; for the custom control, but in my case I want to use an existing DIV that contains the javascript code for the Google Adsense ad. I've tried replacing controlText.innerHTML = 'some html goes here'; with controlText.innerHTML = document.getElementById("verticalad"); but it just breaks the map. Can anyone suggest what I'm doing wrong? I'm hoping it's pretty straight forward to fix. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Google Maps JavaScript API v3 Example: Custom Controls</title> <link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet"> <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> <script> var map; var chicago = new google.maps.LatLng(41.850033, -87.6500523); function HomeControl(controlDiv, map) { controlDiv.style.padding = '4px'; var controlUI = document.createElement('div'); controlUI.style.backgroundColor = 'white'; controlUI.style.borderStyle = 'solid'; controlUI.style.borderWidth = '2px'; controlUI.style.cursor = 'pointer'; controlUI.style.textAlign = 'center'; controlUI.title = 'Click to set the map to Home'; controlDiv.appendChild(controlUI); var controlText = document.createElement('div'); controlText.style.fontFamily = 'Arial,sans-serif'; controlText.style.fontSize = '12px'; controlText.style.paddingLeft = '4px'; controlText.style.paddingRight = '4px'; //**********************************************************************// //Normally this would be controlText.innerHTML = 'some html goes here'; //**********************************************************************// controlText.innerHTML = document.getElementById("verticalad"); controlUI.appendChild(controlText); google.maps.event.addDomListener(controlUI, 'click', function() { map.setCenter(chicago) }); } function initialize() { var mapDiv = document.getElementById('map_canvas'); var mapOptions = { zoom: 12, center: chicago, mapTypeId: google.maps.MapTypeId.TERRAIN, streetViewControl: false, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.RIGHT_BOTTOM } } map = new google.maps.Map(mapDiv, mapOptions); var homeControlDiv = document.createElement('div'); var homeControl = new HomeControl(homeControlDiv, map); homeControlDiv.index = 1; map.controls[google.maps.ControlPosition.LEFT_CENTER].push(homeControlDiv); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:100%;height:700px;"></div> //**************************************************************** // This is the div that needs to be in the custom control //**************************************************************** <div id="verticalad"><script type="text/javascript">adsense code goes here</script></div> </body> </html>
0
11,650,165
07/25/2012 12:52:58
1,396,769
05/15/2012 17:01:44
1
0
Code not working in IE7
My code is working fine for all browser except for IE7. this is code I am using.this is enclosed in another <div> tag. <div class="offerspic"> Pic1 </div> <div class="offersinfo"> <a>Offer1</a><br /> <p><div style="width: 200px;">Offer1 info</div></p> </div> div class="offerspic clear"> Pic2 </div> <div class="offersinfo"> <a>Offer2</a><br /> <p><div style="width: 200px;">Offer2 info</div></p> </div> Style used are .offerspic { width:57px; height:57px; float:left; padding:8px 10px 15px 0px; } .offersinfo { padding-right:10px; font:normal 12px Arial; color:#363636; float:left; margin:7px 0px 15px 0px; } .clear { clear:both; } Can any one help. Thanks in advance.
css
internet-explorer-7
null
null
null
07/25/2012 19:00:28
not a real question
Code not working in IE7 === My code is working fine for all browser except for IE7. this is code I am using.this is enclosed in another <div> tag. <div class="offerspic"> Pic1 </div> <div class="offersinfo"> <a>Offer1</a><br /> <p><div style="width: 200px;">Offer1 info</div></p> </div> div class="offerspic clear"> Pic2 </div> <div class="offersinfo"> <a>Offer2</a><br /> <p><div style="width: 200px;">Offer2 info</div></p> </div> Style used are .offerspic { width:57px; height:57px; float:left; padding:8px 10px 15px 0px; } .offersinfo { padding-right:10px; font:normal 12px Arial; color:#363636; float:left; margin:7px 0px 15px 0px; } .clear { clear:both; } Can any one help. Thanks in advance.
1
11,650,181
07/25/2012 12:53:53
775,761
05/30/2011 05:20:27
962
85
Taking screenshot and setting it again as UIImageView make it smaller size?
I am working on a project where I need to take the screenshot at particular time interval programmatically of a UIImageView and set that image back to that UIImageView. But when I do this, the UIImageview comes with smaller size image then the previous one. Below is the code how I am taking the screenshot. - (UIImage*)screenshot { // Create a graphics context with the target size // On iOS 4 and later, use UIGraphicsBeginImageContextWithOptions to take the scale into consideration // On iOS prior to 4, fall back to use UIGraphicsBeginImageContext CGSize imageSize = [[UIScreen mainScreen] bounds].size; if (NULL != UIGraphicsBeginImageContextWithOptions) UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0); else UIGraphicsBeginImageContext(imageSize); CGContextRef context = UIGraphicsGetCurrentContext(); // Iterate over every window from back to front for (UIWindow *window in [[UIApplication sharedApplication] windows]) { if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen]) { // -renderInContext: renders in the coordinate space of the layer, // so we must first apply the layer's geometry to the graphics context CGContextSaveGState(context); // Center the context around the window's anchor point CGContextTranslateCTM(context, [window center].x, [window center].y); // Apply the window's transform about the anchor point CGContextConcatCTM(context, [window transform]); // Offset by the portion of the bounds left of and above the anchor point CGContextTranslateCTM(context, -[window bounds].size.width * [[window layer] anchorPoint].x, -[window bounds].size.height * [[window layer] anchorPoint].y); // Render the layer hierarchy to the current context [[window layer] renderInContext:context]; // Restore the context CGContextRestoreGState(context); } } // Retrieve the screenshot image UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; } and I set it as theImageView.image=[self screenshot]; Why the image comes with smaller size everytime? And it gets smaller and smaller and smaller. Please share the solution. Thanks in advance
iphone
objective-c
uiimageview
uiimage
screenshot
null
open
Taking screenshot and setting it again as UIImageView make it smaller size? === I am working on a project where I need to take the screenshot at particular time interval programmatically of a UIImageView and set that image back to that UIImageView. But when I do this, the UIImageview comes with smaller size image then the previous one. Below is the code how I am taking the screenshot. - (UIImage*)screenshot { // Create a graphics context with the target size // On iOS 4 and later, use UIGraphicsBeginImageContextWithOptions to take the scale into consideration // On iOS prior to 4, fall back to use UIGraphicsBeginImageContext CGSize imageSize = [[UIScreen mainScreen] bounds].size; if (NULL != UIGraphicsBeginImageContextWithOptions) UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0); else UIGraphicsBeginImageContext(imageSize); CGContextRef context = UIGraphicsGetCurrentContext(); // Iterate over every window from back to front for (UIWindow *window in [[UIApplication sharedApplication] windows]) { if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen]) { // -renderInContext: renders in the coordinate space of the layer, // so we must first apply the layer's geometry to the graphics context CGContextSaveGState(context); // Center the context around the window's anchor point CGContextTranslateCTM(context, [window center].x, [window center].y); // Apply the window's transform about the anchor point CGContextConcatCTM(context, [window transform]); // Offset by the portion of the bounds left of and above the anchor point CGContextTranslateCTM(context, -[window bounds].size.width * [[window layer] anchorPoint].x, -[window bounds].size.height * [[window layer] anchorPoint].y); // Render the layer hierarchy to the current context [[window layer] renderInContext:context]; // Restore the context CGContextRestoreGState(context); } } // Retrieve the screenshot image UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; } and I set it as theImageView.image=[self screenshot]; Why the image comes with smaller size everytime? And it gets smaller and smaller and smaller. Please share the solution. Thanks in advance
0
11,650,186
07/25/2012 12:54:04
1,005,633
10/20/2011 16:21:01
14
0
Get values from anonymous object
I have a listview (in wpf app) which i fill it programmatically `l1.Items.Add(new { AA = aa++, Description = descriptions[k], Shop = names[k + 2], Price = price});`. I want to take the first row and the value of column price. I can take the object `object b = l1.Items.GetItemAt(0);` but i can't take the price..
c#
wpf
listview
anonymous-types
null
null
open
Get values from anonymous object === I have a listview (in wpf app) which i fill it programmatically `l1.Items.Add(new { AA = aa++, Description = descriptions[k], Shop = names[k + 2], Price = price});`. I want to take the first row and the value of column price. I can take the object `object b = l1.Items.GetItemAt(0);` but i can't take the price..
0
11,650,187
07/25/2012 12:54:13
1,436,740
06/05/2012 07:14:54
31
3
file downloading in c#/xaml metro apps in WebView control
I am developing a metro style app. I am using WebView control for accessing the website. Now when I want to download something, I can't get popup for saving it, what I get is just blank page.
c#
xaml
webview
windows-8
microsoft-metro
null
open
file downloading in c#/xaml metro apps in WebView control === I am developing a metro style app. I am using WebView control for accessing the website. Now when I want to download something, I can't get popup for saving it, what I get is just blank page.
0
11,593,897
07/21/2012 16:28:00
1,264,037
03/12/2012 12:00:28
18
3
uploading application in google play in apk file exeed 50 MB?
i upload my application in android market.i have an problem my apk file exceed 50 MB.in developer console to download expansion file. what is this? how to download? otherwise how to compress my apk as 50 MB. help me..
java
android
google-app-engine
google
null
null
open
uploading application in google play in apk file exeed 50 MB? === i upload my application in android market.i have an problem my apk file exceed 50 MB.in developer console to download expansion file. what is this? how to download? otherwise how to compress my apk as 50 MB. help me..
0
11,593,898
07/21/2012 16:28:24
1,444,475
12/28/2009 22:18:52
2,353
3
PHP: glob( realpath() ) reads directory but paths are incorrect
I don't know what I don't get here but I'm trying to read a directory with php and create a JS array with all the image-paths inside of it. So right now I have the following structure on my local server. - project - one - index.php - imgs - image1.png - image2.png So I'm working with my `index.php` right now. I simply want to read the `imgs` folder in the same directory as the `index.php`` $images = glob( realpath('img')."/*.png" ); print_r($images); // just for testing purposes / creating a JS array later foreach( $images as $image ): echo "<img src='" . $image . "' />"; endforeach; the `print_r` function puts out this … Array ( [0] => /Users/my/htdocs/test.com/project/one/img/image1.png [1] => /Users/my/htdocs/test.com/project/one/img/image2.png ) For me this seems pretty ok, but it seems the paths are not correct since they don't really link to the images. Isn't it somehow possible to use relative path's for this? I mean I would just need to get `imgs/image1.png` not the absolute path. Any ideas on that what I'm doing wrong here?
php
glob
realpath
null
null
null
open
PHP: glob( realpath() ) reads directory but paths are incorrect === I don't know what I don't get here but I'm trying to read a directory with php and create a JS array with all the image-paths inside of it. So right now I have the following structure on my local server. - project - one - index.php - imgs - image1.png - image2.png So I'm working with my `index.php` right now. I simply want to read the `imgs` folder in the same directory as the `index.php`` $images = glob( realpath('img')."/*.png" ); print_r($images); // just for testing purposes / creating a JS array later foreach( $images as $image ): echo "<img src='" . $image . "' />"; endforeach; the `print_r` function puts out this … Array ( [0] => /Users/my/htdocs/test.com/project/one/img/image1.png [1] => /Users/my/htdocs/test.com/project/one/img/image2.png ) For me this seems pretty ok, but it seems the paths are not correct since they don't really link to the images. Isn't it somehow possible to use relative path's for this? I mean I would just need to get `imgs/image1.png` not the absolute path. Any ideas on that what I'm doing wrong here?
0
11,594,104
07/21/2012 16:56:44
1,385,655
05/09/2012 20:54:34
144
2
Spring Security - No visible WebSecurityExpressionHandler instance could be found in the application context
I am having trouble displaying a logout link in a JSP page only if the user is authenticated. Here is the exception I have at this line of the JSP page: <sec:authorize access="isAuthenticated()"> Exception: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) .... .... root cause javax.servlet.ServletException: javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags. org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794) org.apache.jsp.WEB_002dINF.pages.hello_jsp._jspService(hello_jsp.java:93) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) .... .... root cause javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags. org.springframework.security.taglibs.authz.AuthorizeTag.getExpressionHandler(AuthorizeTag.java:100) org.springframework.security.taglibs.authz.AuthorizeTag.authorizeUsingAccessExpression(AuthorizeTag.java:58) Here is my application-context-Security.xml: <http auto-config='true' > <intercept-url pattern="/user/**" access="ROLE_User" /> <logout logout-success-url="/hello.htm" /> </http> <beans:bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider"> <beans:property name="userDetailsService" ref="userDetailsService" /> </beans:bean> <beans:bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> <beans:property name="providers"> <beans:list> <beans:ref local="daoAuthenticationProvider" /> </beans:list> </beans:property> </beans:bean> <authentication-manager> <authentication-provider user-service-ref="userDetailsService"> <password-encoder hash="plaintext" /> </authentication-provider> </authentication-manager> I understand that I could use use-expression="true" in the http tag but that means I would have to use expression in the intercept-url tags and in the java code. Is there a workaround?
spring
spring-security
jstl
null
null
null
open
Spring Security - No visible WebSecurityExpressionHandler instance could be found in the application context === I am having trouble displaying a logout link in a JSP page only if the user is authenticated. Here is the exception I have at this line of the JSP page: <sec:authorize access="isAuthenticated()"> Exception: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) .... .... root cause javax.servlet.ServletException: javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags. org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794) org.apache.jsp.WEB_002dINF.pages.hello_jsp._jspService(hello_jsp.java:93) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) .... .... root cause javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags. org.springframework.security.taglibs.authz.AuthorizeTag.getExpressionHandler(AuthorizeTag.java:100) org.springframework.security.taglibs.authz.AuthorizeTag.authorizeUsingAccessExpression(AuthorizeTag.java:58) Here is my application-context-Security.xml: <http auto-config='true' > <intercept-url pattern="/user/**" access="ROLE_User" /> <logout logout-success-url="/hello.htm" /> </http> <beans:bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider"> <beans:property name="userDetailsService" ref="userDetailsService" /> </beans:bean> <beans:bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> <beans:property name="providers"> <beans:list> <beans:ref local="daoAuthenticationProvider" /> </beans:list> </beans:property> </beans:bean> <authentication-manager> <authentication-provider user-service-ref="userDetailsService"> <password-encoder hash="plaintext" /> </authentication-provider> </authentication-manager> I understand that I could use use-expression="true" in the http tag but that means I would have to use expression in the intercept-url tags and in the java code. Is there a workaround?
0
11,594,108
07/21/2012 16:57:20
378,170
06/28/2010 15:36:29
1,727
15
How to setup a Yii configuration file - CProfileLogRoute and CWebLogRoute questions
I'm following the information here: http://www.yiiframework.com/doc/guide/1.1/en/topics.logging Please take a look at my log component on my dev machine configuration file: 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CProfileLogRoute', 'levels'=>'error, warning, trace, info, profile', ), array( 'class'=>'CWebLogRoute', 'levels'=>'error, warning, trace, info, profile', 'showInFireBug'=>true, ), ), Using CProfileLogRoute is of any use JUST AND ONLY IF we place something like this on our application code: Yii::beginProfile('blockID'); ...code block being profiled... Yii::endProfile('blockID'); 1) IF the only purpose is to measure the speed, then what does those **levels** > 'error, warning, trace, info, private' really mean on this context ? 2) `showInFireBug` - where exactly on firebug should we look in order to see those infos? Thanks a lot in advance, MEM
yii
null
null
null
null
null
open
How to setup a Yii configuration file - CProfileLogRoute and CWebLogRoute questions === I'm following the information here: http://www.yiiframework.com/doc/guide/1.1/en/topics.logging Please take a look at my log component on my dev machine configuration file: 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CProfileLogRoute', 'levels'=>'error, warning, trace, info, profile', ), array( 'class'=>'CWebLogRoute', 'levels'=>'error, warning, trace, info, profile', 'showInFireBug'=>true, ), ), Using CProfileLogRoute is of any use JUST AND ONLY IF we place something like this on our application code: Yii::beginProfile('blockID'); ...code block being profiled... Yii::endProfile('blockID'); 1) IF the only purpose is to measure the speed, then what does those **levels** > 'error, warning, trace, info, private' really mean on this context ? 2) `showInFireBug` - where exactly on firebug should we look in order to see those infos? Thanks a lot in advance, MEM
0
11,594,109
07/21/2012 16:57:58
1,495,863
07/02/2012 11:02:29
71
0
Copying part of a std::string to another uninitialised string
I am trying to write a C++ function that splits a std::string containing a URL into it's components. I need to copy the components into this structure: typedef struct urlstruct { string protocol; string address; string port; string page; } urlstruct; Here is the function so far: int parseAnnounce2(string announce, urlstruct *urlinfo){ int i; if(announce.find("://") != string::npos){ // "://" found in string, store protocol for(i = 0; i < announce.find("://"); i++){ } } else { // No "://" found in string } return 0; } I need to copy the characters before the '://' sequence into the urlinfo->protocol string. What is a good way of doing this? I know that I can't assign it using the following line of code, because the protocol string has not been initialized to contain that memory. urlinfo->protocol[i] = announce[i];
c++
string
null
null
null
null
open
Copying part of a std::string to another uninitialised string === I am trying to write a C++ function that splits a std::string containing a URL into it's components. I need to copy the components into this structure: typedef struct urlstruct { string protocol; string address; string port; string page; } urlstruct; Here is the function so far: int parseAnnounce2(string announce, urlstruct *urlinfo){ int i; if(announce.find("://") != string::npos){ // "://" found in string, store protocol for(i = 0; i < announce.find("://"); i++){ } } else { // No "://" found in string } return 0; } I need to copy the characters before the '://' sequence into the urlinfo->protocol string. What is a good way of doing this? I know that I can't assign it using the following line of code, because the protocol string has not been initialized to contain that memory. urlinfo->protocol[i] = announce[i];
0
11,594,116
07/21/2012 16:59:02
1,542,947
07/21/2012 16:47:38
1
0
php: unset not works in foreach
I use unset in foreach loop, but it not working. My code: $aggr = $_GET; foreach($aggr as $key => $value) { $pos_key = preg_replace('/dst_addr/', '', $key); // why this not works: unset($aggr[$key]); unset($aggr[$key.'_h'.$pos_key]); } } in second interation my key is eq $key.'_h'.$pos_key, but this element key should be deleted.
php
foreach
unset
null
null
null
open
php: unset not works in foreach === I use unset in foreach loop, but it not working. My code: $aggr = $_GET; foreach($aggr as $key => $value) { $pos_key = preg_replace('/dst_addr/', '', $key); // why this not works: unset($aggr[$key]); unset($aggr[$key.'_h'.$pos_key]); } } in second interation my key is eq $key.'_h'.$pos_key, but this element key should be deleted.
0
11,594,120
07/21/2012 16:59:30
1,183,979
02/01/2012 23:57:27
235
0
strange behavior when "using" is used
Can I use user defined type, say a class inside using block ? When I used: 1. It said, I need to inherit IDisposable and implement Dispose method. I inherited and tried to define Dispose method, I couldn't. It shows me its not public or something :( Please help me understand this with a small code on how can I achieve it. 2. If I create an instance of a class inside the "using" brackets, although the scope of this variable is only within that using block, why the heck I cannot create another instance of the same class with the same variable outside the using ? I see no good reason for that :( Is my reasoning correct ? But I could use the same variable for instantiating another class outside the using(Is that ok to do ? As I see no compile errors), although I am well aware that we should practise coding guideline (But conceptually I am seeking logic).... Please help, I am new to C#
c#
asp.net
.net
c#-4.0
c#-3.0
null
open
strange behavior when "using" is used === Can I use user defined type, say a class inside using block ? When I used: 1. It said, I need to inherit IDisposable and implement Dispose method. I inherited and tried to define Dispose method, I couldn't. It shows me its not public or something :( Please help me understand this with a small code on how can I achieve it. 2. If I create an instance of a class inside the "using" brackets, although the scope of this variable is only within that using block, why the heck I cannot create another instance of the same class with the same variable outside the using ? I see no good reason for that :( Is my reasoning correct ? But I could use the same variable for instantiating another class outside the using(Is that ok to do ? As I see no compile errors), although I am well aware that we should practise coding guideline (But conceptually I am seeking logic).... Please help, I am new to C#
0
11,594,121
07/21/2012 16:59:38
183,904
10/04/2009 11:16:22
1,508
59
Twig nl2br filter not working on entity
I have an Address entity with a __toString() method like this : public function __toString() { $result = $this->getStreet(); if ($this->getStreet2()) $result .= '\n' . $this->getStreet2(); $result .= '\n' . $this->getZipCode().' '.$this->getCity(); return $result; } In my template, I apply the [Twig nl2br filter][1] on the entity : {{ user.address|nl2br }} but I still get the escaped \n : **1107 West Adams Boulevard\n90007 Los Angeles, CA** I tried using this string instead of the entity : {{ "1107 West Adams Boulevard\n90007 Los Angeles, CA"|nl2br }} And I get the expected result : **1107 West Adams Boulevard** **90007 Los Angeles, CA** I also tried {{ user.address|raw|nl2br }} Which is not safe, but still doesn't work... I've tried with Twig 1.8.0 and 1.9.0. Any idea ? [1]: http://twig.sensiolabs.org/doc/filters/nl2br.html
php
symfony-2.0
twig
template-engine
nl2br
null
open
Twig nl2br filter not working on entity === I have an Address entity with a __toString() method like this : public function __toString() { $result = $this->getStreet(); if ($this->getStreet2()) $result .= '\n' . $this->getStreet2(); $result .= '\n' . $this->getZipCode().' '.$this->getCity(); return $result; } In my template, I apply the [Twig nl2br filter][1] on the entity : {{ user.address|nl2br }} but I still get the escaped \n : **1107 West Adams Boulevard\n90007 Los Angeles, CA** I tried using this string instead of the entity : {{ "1107 West Adams Boulevard\n90007 Los Angeles, CA"|nl2br }} And I get the expected result : **1107 West Adams Boulevard** **90007 Los Angeles, CA** I also tried {{ user.address|raw|nl2br }} Which is not safe, but still doesn't work... I've tried with Twig 1.8.0 and 1.9.0. Any idea ? [1]: http://twig.sensiolabs.org/doc/filters/nl2br.html
0
11,594,123
07/21/2012 17:00:01
920,415
08/30/2011 19:54:36
101
3
In MVC, is the database part of the model?
In RoR with relationships being defined in the model, does this imply that the DB itself is part of the model?
ruby-on-rails
database
mvc
model
null
null
open
In MVC, is the database part of the model? === In RoR with relationships being defined in the model, does this imply that the DB itself is part of the model?
0
11,594,124
07/21/2012 17:00:12
555,336
12/27/2010 20:18:36
438
9
Cocoa - Terminate an application from my code
I have to programmatically terminate (not forcibly) an application from my Cocoa code.<br><br> Actually, here's what it looks like:<br> -(BOOL) terminateAppWithBundle:(NSString*)bundle { NSArray* array = [NSRunningApplication runningApplicationsWithBundleIdentifier:bundle]; if ([array count] > 0){ NSRunningApplication* app = (NSRunningApplication*)[array objectAtIndex:0]; [array makeObjectsPerformSelector:@selector(terminate)]; float time = 0; while (!app.isTerminated){ [NSThread sleepForTimeInterval:0.2]; time += 0.2; if (time >= 15){ return NO; } } } return YES; } <br>It works very well... but only on Snow Leopard and Lion.<br> On Leopard (which i would like to support) the application crashes on start with this error message:<br> Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Crashed Thread: 0 Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSRunningApplication <br>I guess it's because NSRunningApplication is not part of the 10.5 SDK... how can i do the same without using that class?
objective-c
xcode
cocoa
osx-leopard
null
null
open
Cocoa - Terminate an application from my code === I have to programmatically terminate (not forcibly) an application from my Cocoa code.<br><br> Actually, here's what it looks like:<br> -(BOOL) terminateAppWithBundle:(NSString*)bundle { NSArray* array = [NSRunningApplication runningApplicationsWithBundleIdentifier:bundle]; if ([array count] > 0){ NSRunningApplication* app = (NSRunningApplication*)[array objectAtIndex:0]; [array makeObjectsPerformSelector:@selector(terminate)]; float time = 0; while (!app.isTerminated){ [NSThread sleepForTimeInterval:0.2]; time += 0.2; if (time >= 15){ return NO; } } } return YES; } <br>It works very well... but only on Snow Leopard and Lion.<br> On Leopard (which i would like to support) the application crashes on start with this error message:<br> Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Crashed Thread: 0 Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSRunningApplication <br>I guess it's because NSRunningApplication is not part of the 10.5 SDK... how can i do the same without using that class?
0
11,297,797
07/02/2012 16:43:21
1,394,034
05/14/2012 14:55:39
47
0
How to add Window's firewall rule using netsh command
I am trying to add the windows firewall rule using the command **netsh** for "**in**" and "**out**" The below command created the rule, but If I click on the rule "Details" through the control panel(**Control Panel\System and Security\Windows Firewall\Allowed Programs**), the path entry is missing. I checked some of the existing rule "**Details**" (7zip etc) and those rule's path pointing to the actual path of the exe. The newly created rules using the below command not allowing to remove from the allowed programs list through the control panel. C:\Windows\system32>netsh advfirewall firewall add rule name="TestApp.exe" dir=in action=allow program="C:\Users\Test\TestApp.exe" enable=yes Environment: Win7 64 bit.
security
windows-firewall
null
null
null
null
open
How to add Window's firewall rule using netsh command === I am trying to add the windows firewall rule using the command **netsh** for "**in**" and "**out**" The below command created the rule, but If I click on the rule "Details" through the control panel(**Control Panel\System and Security\Windows Firewall\Allowed Programs**), the path entry is missing. I checked some of the existing rule "**Details**" (7zip etc) and those rule's path pointing to the actual path of the exe. The newly created rules using the below command not allowing to remove from the allowed programs list through the control panel. C:\Windows\system32>netsh advfirewall firewall add rule name="TestApp.exe" dir=in action=allow program="C:\Users\Test\TestApp.exe" enable=yes Environment: Win7 64 bit.
0
11,297,798
07/02/2012 16:43:30
139,698
07/16/2009 18:19:56
2,177
5
code mirror using 40% cpu while idle
Initial guess on why cpu at 40% while page is idle? ![enter image description here][1] [1]: http://i.stack.imgur.com/S4Rse.png
codemirror
null
null
null
null
null
open
code mirror using 40% cpu while idle === Initial guess on why cpu at 40% while page is idle? ![enter image description here][1] [1]: http://i.stack.imgur.com/S4Rse.png
0
11,297,802
07/02/2012 16:43:42
747,773
05/10/2011 23:26:33
90
1
Jquery dialog open/close
I'm trying to create a model diaglog in jquery. I would like for my button to open up the diaglog. Currently as soon as it opens it up it also closes it. I never tell it to close it but when i click the button it opens and then immediately closes. Any idea why? <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js" type="text/javascript"></script> <script src="http://jquery-ui. googlecode.com/svn/tags/latest/external/jquery. bgiframe-2.1.2.js" type="text/javascript"></script> <script src="http://jquery-ui. googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script> <asp:Button ID="rejctbutton" runat="server" Text="Reject" /> <div id="rejectiondiv"> <h3> Reason of Rejection for Insurance Claim </h3> <h4> This will email the borrower the reason for the rejection. </h4> <asp:Label ID="rejectLabel" runat="server" Text="Reason"></asp:Label> <asp:TextBox ID="rejectTB" runat="server"></asp:TextBox> </div> <script type="text/javascript"> $("#rejectiondiv").dialog({ autoOpen: false, modal: true }) $("#rejctbutton") .button() .click(function () { $("#rejectiondiv").dialog("open"); }); </script> </form> </body> </html>
jquery-ui
modal-dialog
jquery-ui-dialog
null
null
null
open
Jquery dialog open/close === I'm trying to create a model diaglog in jquery. I would like for my button to open up the diaglog. Currently as soon as it opens it up it also closes it. I never tell it to close it but when i click the button it opens and then immediately closes. Any idea why? <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js" type="text/javascript"></script> <script src="http://jquery-ui. googlecode.com/svn/tags/latest/external/jquery. bgiframe-2.1.2.js" type="text/javascript"></script> <script src="http://jquery-ui. googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script> <asp:Button ID="rejctbutton" runat="server" Text="Reject" /> <div id="rejectiondiv"> <h3> Reason of Rejection for Insurance Claim </h3> <h4> This will email the borrower the reason for the rejection. </h4> <asp:Label ID="rejectLabel" runat="server" Text="Reason"></asp:Label> <asp:TextBox ID="rejectTB" runat="server"></asp:TextBox> </div> <script type="text/javascript"> $("#rejectiondiv").dialog({ autoOpen: false, modal: true }) $("#rejctbutton") .button() .click(function () { $("#rejectiondiv").dialog("open"); }); </script> </form> </body> </html>
0
11,297,807
07/02/2012 16:43:57
587,196
01/24/2011 07:58:51
539
1
How to flatten an XML file into a set of xpath expressions?
Consider I have the following example XML file: <ns1:create xmlns:ns1='http://predic8.com/wsdl/material/ArticleService/1/'> <article xmlns:ns1='http://predic8.com/material/1/'> <name xmlns:ns1='http://predic8.com/material/1/'>foo</name> <description xmlns:ns1='http://predic8.com/material/1/'>bar</description> <price xmlns:ns1='http://predic8.com/common/1/'> <amount xmlns:ns1='http://predic8.com/common/1/'>00.00</amount> <currency xmlns:ns1='http://predic8.com/common/1/'>USD</currency> </price> <id xmlns:ns1='http://predic8.com/material/1/'>1</id> </article> </ns1:create> What would be the best (most efficient) way to flatten this into a set of xpath expressions. Note also: I want to ignore any namespace and attribute information. (If needed, this could also be done as a pre-processing step). So I want get as output: /create/article/name /create/article/description /create/article/price/amount /create/article/price/currency /create/article/id I’m implementing in Java.
java
xml
xpath
null
null
null
open
How to flatten an XML file into a set of xpath expressions? === Consider I have the following example XML file: <ns1:create xmlns:ns1='http://predic8.com/wsdl/material/ArticleService/1/'> <article xmlns:ns1='http://predic8.com/material/1/'> <name xmlns:ns1='http://predic8.com/material/1/'>foo</name> <description xmlns:ns1='http://predic8.com/material/1/'>bar</description> <price xmlns:ns1='http://predic8.com/common/1/'> <amount xmlns:ns1='http://predic8.com/common/1/'>00.00</amount> <currency xmlns:ns1='http://predic8.com/common/1/'>USD</currency> </price> <id xmlns:ns1='http://predic8.com/material/1/'>1</id> </article> </ns1:create> What would be the best (most efficient) way to flatten this into a set of xpath expressions. Note also: I want to ignore any namespace and attribute information. (If needed, this could also be done as a pre-processing step). So I want get as output: /create/article/name /create/article/description /create/article/price/amount /create/article/price/currency /create/article/id I’m implementing in Java.
0
11,297,813
07/02/2012 16:44:11
1,496,648
07/02/2012 16:39:54
1
0
VBA outlook date GMT
How to parse from the email GMT time zone which I get on reply? Sub EmailReply() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply Reply.HTMLBody = Original.HTMLBody & "Your e-mail was received at: " & Original.SentOn & " | " & Original.CreationTime _ ' this I need get TIME zone Mon, 2 Jul 2012 19:27:20 +0300 & " your time zone. And out time zone: " & Original.ReceivedTime & " | Replay time: " & Now 'end Reply.Display End Sub
vba
date
outlook
timezone
gmt
null
open
VBA outlook date GMT === How to parse from the email GMT time zone which I get on reply? Sub EmailReply() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply Reply.HTMLBody = Original.HTMLBody & "Your e-mail was received at: " & Original.SentOn & " | " & Original.CreationTime _ ' this I need get TIME zone Mon, 2 Jul 2012 19:27:20 +0300 & " your time zone. And out time zone: " & Original.ReceivedTime & " | Replay time: " & Now 'end Reply.Display End Sub
0
11,297,819
07/02/2012 16:44:29
861,206
07/25/2011 09:02:16
3
0
Fullcalendar eventrender rails ruby
Well, i work on application for bookingroom and i got a problem if i add the eventrender in my Coffee for render the specific value i want, but when i add it the CSS of my event is broke and i don't understand why. If i remove the EventRender all things display well, but when i add it the value is displayed but the CSS is not here anymore. How i can prevent this ? Well i got a second question i need to make a calendar for many rooms the best way is to use one calendar per room or one calendar for all room and specify the room for each event created. Thanks a lot for your help. click <https://gist.github.com/d680b8141dd8522d63a9> for the code! thank !
ruby-on-rails-3
json
calendar
fullcalendar
null
null
open
Fullcalendar eventrender rails ruby === Well, i work on application for bookingroom and i got a problem if i add the eventrender in my Coffee for render the specific value i want, but when i add it the CSS of my event is broke and i don't understand why. If i remove the EventRender all things display well, but when i add it the value is displayed but the CSS is not here anymore. How i can prevent this ? Well i got a second question i need to make a calendar for many rooms the best way is to use one calendar per room or one calendar for all room and specify the room for each event created. Thanks a lot for your help. click <https://gist.github.com/d680b8141dd8522d63a9> for the code! thank !
0
11,297,820
07/02/2012 16:44:38
1,246,605
03/03/2012 09:14:05
5
0
Php value in Url Rewrite with .htaccess
i hava a tille bug with my script .htaccess : RewriteCond %{REQUEST_URI} !^(.*)/modalbox/.* RewriteCond %{HTTP_HOST} !^www\.wiglost\.com$ RewriteCond %{HTTP_HOST} !^wiglost\.com/modalbox/$ RewriteCond %{HTTP_HOST} ^([^.]+)\.wiglost\.com$ RewriteRule ^([\a-zA-Z0-9\-\_\.\/]*)\.php$ index\.php?acc=%1 [L] RewriteCond %{HTTP_HOST} !^www\.wiglost\.com$ RewriteCond %{HTTP_HOST} ^(.*)\.wiglost\.com$ RewriteRule ^show\.html$ index\.php?acc=%1&show [L] The domain example.wiglost.com is OK but example.wiglost.com/show.html does not correspond to wiglost.com?acc=example&show but action with "show" is not carried out but the action with "acc" is ok. Thanks for your help. Cordially, Metra.
php
.htaccess
url-rewriting
vhosts
null
null
open
Php value in Url Rewrite with .htaccess === i hava a tille bug with my script .htaccess : RewriteCond %{REQUEST_URI} !^(.*)/modalbox/.* RewriteCond %{HTTP_HOST} !^www\.wiglost\.com$ RewriteCond %{HTTP_HOST} !^wiglost\.com/modalbox/$ RewriteCond %{HTTP_HOST} ^([^.]+)\.wiglost\.com$ RewriteRule ^([\a-zA-Z0-9\-\_\.\/]*)\.php$ index\.php?acc=%1 [L] RewriteCond %{HTTP_HOST} !^www\.wiglost\.com$ RewriteCond %{HTTP_HOST} ^(.*)\.wiglost\.com$ RewriteRule ^show\.html$ index\.php?acc=%1&show [L] The domain example.wiglost.com is OK but example.wiglost.com/show.html does not correspond to wiglost.com?acc=example&show but action with "show" is not carried out but the action with "acc" is ok. Thanks for your help. Cordially, Metra.
0
11,297,822
07/02/2012 16:44:40
1,496,617
07/02/2012 16:27:54
1
0
Plot a graph in C by reading values from a file
I need to plot a graph in C by reading values from a file without using any utility tools like matlad,gnuplot etc. I already wrote a program by using C graphics but now i need to extend it by reading values from a file . And i used putpixel() method which is used just for point but is there any other function to draw a line between two points . here is the program which i wrote #include<stdio.h> #include<conio.h> #include<graphics.h> #include<ctype.h> #include<math.h> #include<stdlib.h> void draw(int x1,int y1,int x2,int y2); void main() { int x1,y1,x2,y2; int gdriver=DETECT,gmode,gerror; initgraph(&gdriver,&gmode,”c:\\tc\\bgi:”); printf(“\n Enter the x and y value for starting point:\n”); scanf(“%d%d”,&x1,&y1); printf(“\n Enter the x and y value for ending point:\n”); scanf(“%d%d”,&x2,&y2); printf(“\n The Line is shown below: \n”); draw(x1,y1,x2,y2); getch(); } void draw(int x1,int y1,int x2,int y2) { float x,y,xinc,yinc,dx,dy; int k; int step; dx=x2-x1; dy=y2-y1; if(abs(dx)>abs(dy)) step=abs(dx); else step=abs(dy); xinc=dx/step; yinc=dy/step; x=x1; y=y1; putpixel(x,y,1); for(k=1;k<=step;k++) { x=x+xinc; y=y+yinc; putpixel(x,y,2); } } Kindly help me in reading values from a file .
c
null
null
null
null
07/03/2012 11:51:56
not a real question
Plot a graph in C by reading values from a file === I need to plot a graph in C by reading values from a file without using any utility tools like matlad,gnuplot etc. I already wrote a program by using C graphics but now i need to extend it by reading values from a file . And i used putpixel() method which is used just for point but is there any other function to draw a line between two points . here is the program which i wrote #include<stdio.h> #include<conio.h> #include<graphics.h> #include<ctype.h> #include<math.h> #include<stdlib.h> void draw(int x1,int y1,int x2,int y2); void main() { int x1,y1,x2,y2; int gdriver=DETECT,gmode,gerror; initgraph(&gdriver,&gmode,”c:\\tc\\bgi:”); printf(“\n Enter the x and y value for starting point:\n”); scanf(“%d%d”,&x1,&y1); printf(“\n Enter the x and y value for ending point:\n”); scanf(“%d%d”,&x2,&y2); printf(“\n The Line is shown below: \n”); draw(x1,y1,x2,y2); getch(); } void draw(int x1,int y1,int x2,int y2) { float x,y,xinc,yinc,dx,dy; int k; int step; dx=x2-x1; dy=y2-y1; if(abs(dx)>abs(dy)) step=abs(dx); else step=abs(dy); xinc=dx/step; yinc=dy/step; x=x1; y=y1; putpixel(x,y,1); for(k=1;k<=step;k++) { x=x+xinc; y=y+yinc; putpixel(x,y,2); } } Kindly help me in reading values from a file .
1
11,297,823
07/02/2012 16:44:45
398,499
07/21/2010 21:34:07
644
25
ApplicationDispatcher exception
Whenever I try to redirect to a certain page using this dispatch method that is called from my `doGet` method, I get the following exception. I have no idea why! protected void dispatch(HttpServletRequest request, HttpServletResponse response, String page) throws javax.servlet.ServletException, java.io.IOException { RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(page); try { dispatcher.forward(request, response); } catch (java.lang.NullPointerException e) { System.out.println("NullPointerException: attribute expected in view"); } } **Error msg** java.lang.NullPointerException org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) java.lang.NullPointerException org.apache.jsp.content.edit_jsp._jspService(edit_jsp.java:109) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
java
servlets
null
null
null
null
open
ApplicationDispatcher exception === Whenever I try to redirect to a certain page using this dispatch method that is called from my `doGet` method, I get the following exception. I have no idea why! protected void dispatch(HttpServletRequest request, HttpServletResponse response, String page) throws javax.servlet.ServletException, java.io.IOException { RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(page); try { dispatcher.forward(request, response); } catch (java.lang.NullPointerException e) { System.out.println("NullPointerException: attribute expected in view"); } } **Error msg** java.lang.NullPointerException org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) java.lang.NullPointerException org.apache.jsp.content.edit_jsp._jspService(edit_jsp.java:109) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
0
11,297,824
07/02/2012 16:44:46
1,496,616
07/02/2012 16:26:43
1
0
Enhanced task board, quick edit
**In the enhanced task board, while trying to quick edit a task can the owner drop down be modified to team wise rather than in alphabetic order?**
rally
null
null
null
null
07/03/2012 11:50:59
not a real question
Enhanced task board, quick edit === **In the enhanced task board, while trying to quick edit a task can the owner drop down be modified to team wise rather than in alphabetic order?**
1
11,297,825
07/02/2012 16:44:46
1,421,836
05/28/2012 13:41:59
55
2
Keywords database searching 5+ tables
I have tried regular expressions such as `SELECT * FROM addresses WHERE LOWER(`address`) REGEXP '\b(keyword_a|keywords_b|keyword_c)\b'` and other queries like using `WHERE `addresses` LIKE '%$keyword%'` but none seem to work correctly. I have been advised to create a keyword database but the idea is: you have tenants, tenancy agreements, properties and landlords and the bank statements are imported as a CSV file and uploaded into another table. I need the code to read each line of the statement and try to match that description/amount of the statement to someone, so a tenant for example. Bank statements can differ from having part of the address to having the persons name on, as well as maybe even having a partial amount for the rent. If I were to create a keywords database, how would I go about doing this? As there would be lots of matches to a name of a road for example. Relevance might work but some part of the statements may have random numbers in that might be treated as a key word that would add up more than the real result. I am starting again with this: //$a = date, $b = type (BACS, Transfer, etc), $c = description, $d = amount (£) function reconcile($a,$b,$c,$d) { //break down the inputs into an array //create SQL query that matches all of these key words //create keywords database $keywords = explode(" ", trim($a . " " . $b . " " . $c . " " . $d)); //mysql_query() add up results that match and MAX() relevance //according to how many results are found. } Any suggestions how to tackle this correctly?
mysql
query
onlinebanking
null
null
07/03/2012 14:29:53
off topic
Keywords database searching 5+ tables === I have tried regular expressions such as `SELECT * FROM addresses WHERE LOWER(`address`) REGEXP '\b(keyword_a|keywords_b|keyword_c)\b'` and other queries like using `WHERE `addresses` LIKE '%$keyword%'` but none seem to work correctly. I have been advised to create a keyword database but the idea is: you have tenants, tenancy agreements, properties and landlords and the bank statements are imported as a CSV file and uploaded into another table. I need the code to read each line of the statement and try to match that description/amount of the statement to someone, so a tenant for example. Bank statements can differ from having part of the address to having the persons name on, as well as maybe even having a partial amount for the rent. If I were to create a keywords database, how would I go about doing this? As there would be lots of matches to a name of a road for example. Relevance might work but some part of the statements may have random numbers in that might be treated as a key word that would add up more than the real result. I am starting again with this: //$a = date, $b = type (BACS, Transfer, etc), $c = description, $d = amount (£) function reconcile($a,$b,$c,$d) { //break down the inputs into an array //create SQL query that matches all of these key words //create keywords database $keywords = explode(" ", trim($a . " " . $b . " " . $c . " " . $d)); //mysql_query() add up results that match and MAX() relevance //according to how many results are found. } Any suggestions how to tackle this correctly?
2
11,297,827
07/02/2012 16:44:52
1,427,290
05/31/2012 01:21:52
15
0
HTML5 Date Input Type Interfering with jQuery Datepicker
I am using the jQuery UI's datepicker for date selections on my site. One of my users just upgraded to the newest version of Chrome, which has built-in native date picker for HTML5. The big problem as the two UIs overlap each other. The other problem is when the user submits a date, the date in database reverts to "0000-00-00" and is producing bad data. If I remove the jQuery datepicker, most of the users not using the latest-greatest browsers will not have a popup date picker. And, those who have the newest browser will have two overlapping calendars which breaks the application. My question is how do I disable the newest browsers from displaying the built-in date function and just continue to use the jQuery Datepicker? Thanks, Ed
html5
jquery-ui
null
null
null
null
open
HTML5 Date Input Type Interfering with jQuery Datepicker === I am using the jQuery UI's datepicker for date selections on my site. One of my users just upgraded to the newest version of Chrome, which has built-in native date picker for HTML5. The big problem as the two UIs overlap each other. The other problem is when the user submits a date, the date in database reverts to "0000-00-00" and is producing bad data. If I remove the jQuery datepicker, most of the users not using the latest-greatest browsers will not have a popup date picker. And, those who have the newest browser will have two overlapping calendars which breaks the application. My question is how do I disable the newest browsers from displaying the built-in date function and just continue to use the jQuery Datepicker? Thanks, Ed
0
11,714,323
07/30/2012 01:04:12
1,462,931
06/18/2012 06:51:13
8
0
Select specific result only from multiple results and combinations
I have the following simple query: SELECT Company.Company_Name, Company_Team.Team_Role_Recid FROM Company INNER JOIN Company_Team ON Company_Team.Company_RecID = Company.Company_RecID The values for Team_Role_Recid can be: 1, 2, 3 or NULL Or a combination. There can be 1 and a 2, or a 2 and 3, or just a 2, or nothing at all, etc. You get the idea. I want to always list every Company_Name result, but only show Team_Role_Recid if it is a 1, otherwise have it replaced with ‘None Assigned’. I’ve tried various methods in a where clause, even attempted a sub-query, using CASE WHEN in the select statement for the 'None Assigned' change with no luck. Cheers
tsql
null
null
null
null
null
open
Select specific result only from multiple results and combinations === I have the following simple query: SELECT Company.Company_Name, Company_Team.Team_Role_Recid FROM Company INNER JOIN Company_Team ON Company_Team.Company_RecID = Company.Company_RecID The values for Team_Role_Recid can be: 1, 2, 3 or NULL Or a combination. There can be 1 and a 2, or a 2 and 3, or just a 2, or nothing at all, etc. You get the idea. I want to always list every Company_Name result, but only show Team_Role_Recid if it is a 1, otherwise have it replaced with ‘None Assigned’. I’ve tried various methods in a where clause, even attempted a sub-query, using CASE WHEN in the select statement for the 'None Assigned' change with no luck. Cheers
0
11,733,522
07/31/2012 05:16:29
1,564,716
07/31/2012 05:08:44
1
0
How can I bind custom buttons to custom google maps
Hi all actually I've build my custom map on google maps(not using google API) You can check it here https://maps.google.co.id/maps/ms?msid=203598004921617660384.0004c358d4d6b5fadfaea&msa=0&ll=-6.10676,106.891479&spn=0.230428,0.41851&iwloc=0004c36c082aa1941e328 I want to make custom buttons(outside the maps) when clicked it moved the marker to certain location which I've added the location without reloading the question is what must I do to bind these buttons to the maps? I've read the google maps API but I think it's too complicated Can anyone help me??
google-maps
null
null
null
null
null
open
How can I bind custom buttons to custom google maps === Hi all actually I've build my custom map on google maps(not using google API) You can check it here https://maps.google.co.id/maps/ms?msid=203598004921617660384.0004c358d4d6b5fadfaea&msa=0&ll=-6.10676,106.891479&spn=0.230428,0.41851&iwloc=0004c36c082aa1941e328 I want to make custom buttons(outside the maps) when clicked it moved the marker to certain location which I've added the location without reloading the question is what must I do to bind these buttons to the maps? I've read the google maps API but I think it's too complicated Can anyone help me??
0
11,733,526
07/31/2012 05:17:16
1,242,018
03/01/2012 06:51:51
93
3
How to check Array contain <null> value?
How to check array contain "null" value. Example: ArrayEmailCheck: ( { "MAX(CustID)" = "<null>"; } ) I tried with this if ([ArrayEmailCheck containsObject:[NSNull null]]) { NSLog(@"Contain null"); } else { NSLog(@"Not Contain"); } Please any one suggest me how can i do that?
iphone
objective-c
cocoa-touch
iphone-sdk-4.0
null
07/31/2012 06:09:34
not a real question
How to check Array contain <null> value? === How to check array contain "null" value. Example: ArrayEmailCheck: ( { "MAX(CustID)" = "<null>"; } ) I tried with this if ([ArrayEmailCheck containsObject:[NSNull null]]) { NSLog(@"Contain null"); } else { NSLog(@"Not Contain"); } Please any one suggest me how can i do that?
1
11,734,151
07/31/2012 06:11:14
1,548,451
07/24/2012 10:56:02
1
1
XML validation in xml file with Eclipse
I have some problens with validating my xml file. I get the error message "cvc-elt.1: Cannot find the declaration of element 'xsi:settings'." in my xml file . To me, my code is correct, nut obviously it should'nt be.. My xml file: <?xml version="1.0" encoding="UTF-8"?> <xsi:settings xsi:noNamespaceSchemaLocation="http://www.w3.org/2001/XMLSchema/Application.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema" > <info> <Version>1.0</Version> <Release_date>2012-07-27</Release_date> </info> <config> <Betriebssystem>Windows</Betriebssystem> <Wildcard>%</Wildcard> <Errormessages> <View1> <Message1>Der neue Mitarbeiter braucht ein Geburtsdatum der Form JJJJ-MM-TT und eine nicht vorhandene Personalnummer</Message1> <Message2>Dem Mitarbeiter muss eine Personalnummer zugewiesen werden</Message2> </View1> <View3> <Message1>Sie muessen mindestens ein Kriterienfeld ausfuellen"</Message1> <Message2>Der Mitarbeiter braucht ein Geburtsdatum der Form JJJJ-MM-TT und eine nicht vorhandene Personalnummer</Message2> <Message3>Sie muessen erst einen Mitarbeiter laden</Message3> <Message4>Problem beim Loeschen des Mitarbeiters. Ist der Mitarbeiter in der Datenbank vorhanden?</Message4> </View3> </Errormessages> </config> </xsi:settings> My xsd file(has no errors): <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema" > <xs:element name="settings"> <xs:complexType> <xs:sequence> <xs:element name="info"> <xs:complexType> <xs:sequence> <xs:element type="xs:float" name="Version"/> <xs:element type="xs:date" name="Release_date"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="config"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Betriebssystem"/> <xs:element type="xs:string" name="Wildcard"/> <xs:element name="Errormessages"> <xs:complexType> <xs:sequence> <xs:element name="View1"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Message1"/> <xs:element type="xs:string" name="Message2"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="View3"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Message1"/> <xs:element type="xs:string" name="Message2"/> <xs:element type="xs:string" name="Message3"/> <xs:element type="xs:string" name="Message4"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Thanks in advance for your help. Harald
xml
xsd
jaxb
xml-validation
xsd-validation
null
open
XML validation in xml file with Eclipse === I have some problens with validating my xml file. I get the error message "cvc-elt.1: Cannot find the declaration of element 'xsi:settings'." in my xml file . To me, my code is correct, nut obviously it should'nt be.. My xml file: <?xml version="1.0" encoding="UTF-8"?> <xsi:settings xsi:noNamespaceSchemaLocation="http://www.w3.org/2001/XMLSchema/Application.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema" > <info> <Version>1.0</Version> <Release_date>2012-07-27</Release_date> </info> <config> <Betriebssystem>Windows</Betriebssystem> <Wildcard>%</Wildcard> <Errormessages> <View1> <Message1>Der neue Mitarbeiter braucht ein Geburtsdatum der Form JJJJ-MM-TT und eine nicht vorhandene Personalnummer</Message1> <Message2>Dem Mitarbeiter muss eine Personalnummer zugewiesen werden</Message2> </View1> <View3> <Message1>Sie muessen mindestens ein Kriterienfeld ausfuellen"</Message1> <Message2>Der Mitarbeiter braucht ein Geburtsdatum der Form JJJJ-MM-TT und eine nicht vorhandene Personalnummer</Message2> <Message3>Sie muessen erst einen Mitarbeiter laden</Message3> <Message4>Problem beim Loeschen des Mitarbeiters. Ist der Mitarbeiter in der Datenbank vorhanden?</Message4> </View3> </Errormessages> </config> </xsi:settings> My xsd file(has no errors): <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema" > <xs:element name="settings"> <xs:complexType> <xs:sequence> <xs:element name="info"> <xs:complexType> <xs:sequence> <xs:element type="xs:float" name="Version"/> <xs:element type="xs:date" name="Release_date"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="config"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Betriebssystem"/> <xs:element type="xs:string" name="Wildcard"/> <xs:element name="Errormessages"> <xs:complexType> <xs:sequence> <xs:element name="View1"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Message1"/> <xs:element type="xs:string" name="Message2"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="View3"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="Message1"/> <xs:element type="xs:string" name="Message2"/> <xs:element type="xs:string" name="Message3"/> <xs:element type="xs:string" name="Message4"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Thanks in advance for your help. Harald
0
11,734,155
07/31/2012 06:11:25
1,352,571
04/24/2012 00:49:09
164
4
Zend framework Display group decorators
<?php class Application_Form_Auth extends Zend_Form { public function init() { $this->setAttrib('enctype', 'multipart/form-data'); $this->setMethod('post'); $username = $this->createElement('text','username'); $username->setLabel('Username:') ->setRequired(true); $username->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $password=$this->createElement('password','password'); $password->setLabel('Password:') ->setRequired(true); $password->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $file = new Zend_Form_Element_File('file'); $file->setLabel('Select File:') ->setDestination(BASE_PATH . '/data/uploads') ->setRequired(true); $file->setDecorators(array( 'file', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $captcha = $this->createElement('captcha', 'captcha', array('required' => true, 'captcha' => array( 'captcha' => 'Image', 'font' => BASE_PATH .'/fonts/Average-Regular.ttf', 'fontSize' => '24', 'wordLen' => 5, 'height' => '75', 'width' => '200', 'imgDir'=> BASE_PATH.'/images/captcha', 'imgUrl'=>'../../images/captcha/', 'dotNoiseLevel' => 50, 'lineNoiseLevel' => 5))); $captcha->setLabel('Please type the words shown:'); $captcha->setDecorators(array( 'captcha', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $form = new ZendX_JQuery_Form(); $date1 = new ZendX_JQuery_Form_Element_DatePicker( 'date1', array('label' => 'Date:') ); $date1->setDecorators(array( 'UiWidgetElement', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $reg=$this->createElement('submit','submit'); $reg->setLabel('save'); $reg->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td', 'colspan'=>'2','align'=>'center')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $this->setDecorators(array( 'FormElements', array(array('data'=>'HtmlTag'),array('tag'=>'table')), 'Form' )); $this->addElements(array( $username, $password, $file, $captcha, $date1, $reg )); $this->addDisplayGroup(array('username', 'password','file','captcha','date1','submit'), 'login',array('legend' =>'Add User')); $login = $this->getDisplayGroup('login'); $login->setDecorators(array( 'FormElements', 'Fieldset', array('HtmlTag',array('tag'=>'div','style'=>'width:70%;;float:left; padding-top:5px;')) )); return $this; } } ?> addUser.phtml <?php echo $this->form->getDisplayGroup('login'); //This form aligned perfectly echo $this->form; //This won't ?> I am new to zend framework . i just started playing with zend decorators and DisplayGroup this morning. So please help me with this issue .
html
zend-framework
null
null
null
null
open
Zend framework Display group decorators === <?php class Application_Form_Auth extends Zend_Form { public function init() { $this->setAttrib('enctype', 'multipart/form-data'); $this->setMethod('post'); $username = $this->createElement('text','username'); $username->setLabel('Username:') ->setRequired(true); $username->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $password=$this->createElement('password','password'); $password->setLabel('Password:') ->setRequired(true); $password->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $file = new Zend_Form_Element_File('file'); $file->setLabel('Select File:') ->setDestination(BASE_PATH . '/data/uploads') ->setRequired(true); $file->setDecorators(array( 'file', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $captcha = $this->createElement('captcha', 'captcha', array('required' => true, 'captcha' => array( 'captcha' => 'Image', 'font' => BASE_PATH .'/fonts/Average-Regular.ttf', 'fontSize' => '24', 'wordLen' => 5, 'height' => '75', 'width' => '200', 'imgDir'=> BASE_PATH.'/images/captcha', 'imgUrl'=>'../../images/captcha/', 'dotNoiseLevel' => 50, 'lineNoiseLevel' => 5))); $captcha->setLabel('Please type the words shown:'); $captcha->setDecorators(array( 'captcha', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $form = new ZendX_JQuery_Form(); $date1 = new ZendX_JQuery_Form_Element_DatePicker( 'date1', array('label' => 'Date:') ); $date1->setDecorators(array( 'UiWidgetElement', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $reg=$this->createElement('submit','submit'); $reg->setLabel('save'); $reg->setDecorators(array( 'ViewHelper', 'Description', 'Errors', array(array('data'=>'HtmlTag'), array('tag' => 'td', 'colspan'=>'2','align'=>'center')), array(array('row'=>'HtmlTag'),array('tag'=>'tr')) )); $this->setDecorators(array( 'FormElements', array(array('data'=>'HtmlTag'),array('tag'=>'table')), 'Form' )); $this->addElements(array( $username, $password, $file, $captcha, $date1, $reg )); $this->addDisplayGroup(array('username', 'password','file','captcha','date1','submit'), 'login',array('legend' =>'Add User')); $login = $this->getDisplayGroup('login'); $login->setDecorators(array( 'FormElements', 'Fieldset', array('HtmlTag',array('tag'=>'div','style'=>'width:70%;;float:left; padding-top:5px;')) )); return $this; } } ?> addUser.phtml <?php echo $this->form->getDisplayGroup('login'); //This form aligned perfectly echo $this->form; //This won't ?> I am new to zend framework . i just started playing with zend decorators and DisplayGroup this morning. So please help me with this issue .
0
11,733,024
07/31/2012 04:18:42
1,050,738
11/17/2011 00:06:55
34
0
calculate movement based on time
So I am workng on a little project, mostly to help me learn better javascript and I'm having a little problem. I can do animations just fine, but my problem is.. I'm trying to figure out the math necessary to calculate the amount of change in pixels to move each step of the animation. So say my div is 450px wide and I'm saying animate({ width : 600, duration : 2000 }). that leaves 150px of total movement, but how much movement to I do for each frame if I'm calling my setTimeout function every 3 milliseconds. I know the solution is probably simple but for some reason, maybe just because I have been beating my head on a wall for while writing this whole thing and now I can't think enough to figure it out. I can show code examples if anyone needs. Thank you for the help in advance.
javascript
math
null
null
null
null
open
calculate movement based on time === So I am workng on a little project, mostly to help me learn better javascript and I'm having a little problem. I can do animations just fine, but my problem is.. I'm trying to figure out the math necessary to calculate the amount of change in pixels to move each step of the animation. So say my div is 450px wide and I'm saying animate({ width : 600, duration : 2000 }). that leaves 150px of total movement, but how much movement to I do for each frame if I'm calling my setTimeout function every 3 milliseconds. I know the solution is probably simple but for some reason, maybe just because I have been beating my head on a wall for while writing this whole thing and now I can't think enough to figure it out. I can show code examples if anyone needs. Thank you for the help in advance.
0
11,733,025
07/31/2012 04:18:53
1,452,679
06/13/2012 03:02:09
1
0
Javascript covert time to get different between windows and linux
I coveted time value at client side, when I tested it from same browser:chrome on linux and windows. windows: var d = new Date(1995,9,1,1,15,0,0) d Sun Oct 01 1995 01:15:00 GMT+1300 (New Zealand Daylight Time) d.getTime() **812463300000** var d = new Date(1995,9,1,3,15,0,0) d Sun Oct 01 1995 03:15:00 GMT+1300 (New Zealand Daylight Time) d.getTime() **812470500000** linux : var d = new Date(1995,9,1,1,15,0,0) d Sun Oct 01 1995 01:15:00 GMT+1200 (NZST) d.getTime() **812466900000** var d = new Date(1995,9,1,3,15,0,0) d Sun Oct 01 1995 03:15:00 GMT+1300 (NZDT) d.getTime() **812470500000** The problem is the server will get different milliseconds value which I convert at client side. I know it can be resolved by converting the string value at server side, but if I must convert it at client side, anyone can give me a correct direction to resolve this problem. Thanks
javascript
windows
linux
date
timezone
null
open
Javascript covert time to get different between windows and linux === I coveted time value at client side, when I tested it from same browser:chrome on linux and windows. windows: var d = new Date(1995,9,1,1,15,0,0) d Sun Oct 01 1995 01:15:00 GMT+1300 (New Zealand Daylight Time) d.getTime() **812463300000** var d = new Date(1995,9,1,3,15,0,0) d Sun Oct 01 1995 03:15:00 GMT+1300 (New Zealand Daylight Time) d.getTime() **812470500000** linux : var d = new Date(1995,9,1,1,15,0,0) d Sun Oct 01 1995 01:15:00 GMT+1200 (NZST) d.getTime() **812466900000** var d = new Date(1995,9,1,3,15,0,0) d Sun Oct 01 1995 03:15:00 GMT+1300 (NZDT) d.getTime() **812470500000** The problem is the server will get different milliseconds value which I convert at client side. I know it can be resolved by converting the string value at server side, but if I must convert it at client side, anyone can give me a correct direction to resolve this problem. Thanks
0
11,734,159
07/31/2012 06:11:58
84,201
03/29/2009 07:46:24
13,486
182
CSS not working in IE7 but all
I'm working on a client site in-house. Where a particular CSS is not applying in IE7 but fine in IE8,9 and others. I'm checking in IE9 with IE7 browsing and Document mode. **CSS** ul.default-list { margin: 0; padding: 0; list-style: none; font-size: 14px; margin-bottom: 20px; } ul.default-list li { padding: 0; margin: 0; background: url(../images/arrow-red.gif) no-repeat left 6px; padding-left: 13px; margin-bottom: 17px; } .fl { float: left; } .no-margin li { margin: 0; } HTML <ul class="default-list fl no-margin" sizcache="2" sizset="10"> <LI sizcache="0" sizset="20"><A href="#item1">Item 1</A> <LI sizcache="0" sizset="21"><A href="#Item 2">Item 2</A> <LI sizcache="0" sizset="22"><A href="#Item 3">Item 3</A> <LI sizcache="0" sizset="23"><A href="#Item 4">Item 4</A> </ul>
css
internet-explorer-7
cross-browser
null
null
null
open
CSS not working in IE7 but all === I'm working on a client site in-house. Where a particular CSS is not applying in IE7 but fine in IE8,9 and others. I'm checking in IE9 with IE7 browsing and Document mode. **CSS** ul.default-list { margin: 0; padding: 0; list-style: none; font-size: 14px; margin-bottom: 20px; } ul.default-list li { padding: 0; margin: 0; background: url(../images/arrow-red.gif) no-repeat left 6px; padding-left: 13px; margin-bottom: 17px; } .fl { float: left; } .no-margin li { margin: 0; } HTML <ul class="default-list fl no-margin" sizcache="2" sizset="10"> <LI sizcache="0" sizset="20"><A href="#item1">Item 1</A> <LI sizcache="0" sizset="21"><A href="#Item 2">Item 2</A> <LI sizcache="0" sizset="22"><A href="#Item 3">Item 3</A> <LI sizcache="0" sizset="23"><A href="#Item 4">Item 4</A> </ul>
0
11,216,589
06/26/2012 22:02:13
1,387,444
05/10/2012 14:57:23
23
0
Best Eclipse plugin for visualization XText
I have my own XText language grammar for UML class diagrams and I need to visualize that. Which Eclipse plugin is the best? EMF (sucks), GMF, or anything else?
eclipse
plugins
uml
class-diagram
xtext
null
open
Best Eclipse plugin for visualization XText === I have my own XText language grammar for UML class diagrams and I need to visualize that. Which Eclipse plugin is the best? EMF (sucks), GMF, or anything else?
0
11,226,165
06/27/2012 12:26:14
1,485,567
06/27/2012 12:08:05
1
0
GWT 1.7.1 Datepicker does not pick correct dates on 29, 30, 31st of month
I am using gwt datepicker for my application. I have one form with text box to enter date as YYYY-MM. On 31st of May, if i enter 2012-04 in the field it shows an error in UI as "2012-04 is not a valid date. It must be in the format of YYYY-MM" I think this occurs because April month doesnt have 31 days. I have overridden datepicker's getValue method so that it takes 1'st as the day. But the problem persists public Date getValue() { if(!isRendered()) return super.getValue(); if(super.getValue() != null && getRawValue().length() =Constants.DATE_FORMAT_YYYY_MM.length()) { DateWrapper dw = new DateWrapper(super.getValue()); dw = dw.addDays(1-dw.getDate()); return dw.asDate(); } else return null; How to resolve the issue? Any help is much appreciated.
java
gwt
null
null
null
null
open
GWT 1.7.1 Datepicker does not pick correct dates on 29, 30, 31st of month === I am using gwt datepicker for my application. I have one form with text box to enter date as YYYY-MM. On 31st of May, if i enter 2012-04 in the field it shows an error in UI as "2012-04 is not a valid date. It must be in the format of YYYY-MM" I think this occurs because April month doesnt have 31 days. I have overridden datepicker's getValue method so that it takes 1'st as the day. But the problem persists public Date getValue() { if(!isRendered()) return super.getValue(); if(super.getValue() != null && getRawValue().length() =Constants.DATE_FORMAT_YYYY_MM.length()) { DateWrapper dw = new DateWrapper(super.getValue()); dw = dw.addDays(1-dw.getDate()); return dw.asDate(); } else return null; How to resolve the issue? Any help is much appreciated.
0
11,226,169
06/27/2012 12:26:19
1,485,595
06/27/2012 12:15:58
1
0
fb comments only shown in moderate view
I am really very close to pull my hair off! I have already spent a few hours researching about this problem and couldn't find a solution. I am running a WordPress website with the OptimizePress Theme! On one of my pages I have integrated the FB comments widget! Almost everything works as it is supposed to be. Except that all posts have to be moderated even when I have selected "Make every post public by default." The Object Debugger doesn't show any errors. It would be really great if anyone could come up with a solution. Thank you very much Christian P.S. When the issue appeared the first time I have deleted the app from facebook and created a new one in order to receive a new app-id. But the problem is still the same!
wordpress
facebook-comments
null
null
null
null
open
fb comments only shown in moderate view === I am really very close to pull my hair off! I have already spent a few hours researching about this problem and couldn't find a solution. I am running a WordPress website with the OptimizePress Theme! On one of my pages I have integrated the FB comments widget! Almost everything works as it is supposed to be. Except that all posts have to be moderated even when I have selected "Make every post public by default." The Object Debugger doesn't show any errors. It would be really great if anyone could come up with a solution. Thank you very much Christian P.S. When the issue appeared the first time I have deleted the app from facebook and created a new one in order to receive a new app-id. But the problem is still the same!
0
11,226,170
06/27/2012 12:26:21
885,453
08/09/2011 07:50:16
3
0
Link to servlet produce java.net.SocketException with double click
I have a link calling a servlet that it's producing this exception when someone clicks two times on the link and the servlet arrives to the forward: RequestDispatcher rd = ctx.getRequestDispatcher(urlDestino); try { rd.forward(request, response); } catch (Exception e) { e.printStackTrace(); } The exception is the next one: 14:12:13,747 ERROR [STDERR] ClientAbortException: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) 14:12:13,747 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309) 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.connector.Response.flushBuffer(Response.java:542) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:279) 14:12:13,748 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:224) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) 14:12:13,748 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) 14:12:13,748 ERROR [STDERR] at es.bde.arq.ias.gestionpeticiones.GestorDePeticiones.procesaRespuesta(GestorDePeticiones.java:419) 14:12:13,748 ERROR [STDERR] at es.bde.arq.ias.gestionpeticiones.GestorDePeticiones.service(GestorDePeticiones.java:240) 14:12:13,748 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at filters.FiltroAcceso.doFilter(FiltroAcceso.java:108) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 14:12:13,749 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662) 14:12:13,749 ERROR [STDERR] Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1325) 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1337) 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:44) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.Response.doWrite(Response.java:560) 14:12:13,750 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) 14:12:13,750 ERROR [STDERR] ... 40 more 14:12:13,750 ERROR [STDERR] Caused by: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1692) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1656) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1601) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:94) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.Response.doWrite(Response.java:560) 14:12:13,750 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:242) 14:12:13,750 ERROR [STDERR] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122) 14:12:13,751 ERROR [STDERR] at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212) 14:12:13,751 ERROR [STDERR] at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:191) 14:12:13,751 ERROR [STDERR] at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:134) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:458) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:162) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:171) 14:12:13,751 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl$WriteBehindStateWriter.write(ViewHandlerImpl.java:862) 14:12:13,751 ERROR [STDERR] at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:620) 14:12:13,751 ERROR [STDERR] at uIClasses.BDE_IAS_UIComboBox.encodeBegin(BDE_IAS_UIComboBox.java:1320) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266) 14:12:13,752 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197) 14:12:13,752 ERROR [STDERR] ... 34 more 14:12:13,752 ERROR [STDERR] Caused by: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite0(Native Method) 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.write(SocketOutputStream.java:136) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:297) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:286) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:748) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:736) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:89) 14:12:13,752 ERROR [STDERR] ... 73 more How can I avoid the double click event (without JS) or prevent this exception? I'm using JSF 1.2 and SSL. Thank you.
servlets
ssl
jsf-1.2
null
null
null
open
Link to servlet produce java.net.SocketException with double click === I have a link calling a servlet that it's producing this exception when someone clicks two times on the link and the servlet arrives to the forward: RequestDispatcher rd = ctx.getRequestDispatcher(urlDestino); try { rd.forward(request, response); } catch (Exception e) { e.printStackTrace(); } The exception is the next one: 14:12:13,747 ERROR [STDERR] ClientAbortException: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) 14:12:13,747 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309) 14:12:13,747 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.connector.Response.flushBuffer(Response.java:542) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:279) 14:12:13,748 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:224) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) 14:12:13,748 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) 14:12:13,748 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) 14:12:13,748 ERROR [STDERR] at es.bde.arq.ias.gestionpeticiones.GestorDePeticiones.procesaRespuesta(GestorDePeticiones.java:419) 14:12:13,748 ERROR [STDERR] at es.bde.arq.ias.gestionpeticiones.GestorDePeticiones.service(GestorDePeticiones.java:240) 14:12:13,748 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at filters.FiltroAcceso.doFilter(FiltroAcceso.java:108) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 14:12:13,748 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 14:12:13,749 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 14:12:13,749 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 14:12:13,749 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662) 14:12:13,749 ERROR [STDERR] Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1325) 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1337) 14:12:13,749 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:44) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,749 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124) 14:12:13,749 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.Response.doWrite(Response.java:560) 14:12:13,750 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) 14:12:13,750 ERROR [STDERR] ... 40 more 14:12:13,750 ERROR [STDERR] Caused by: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1692) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1656) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1601) 14:12:13,750 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:94) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) 14:12:13,750 ERROR [STDERR] at org.apache.coyote.Response.doWrite(Response.java:560) 14:12:13,750 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) 14:12:13,750 ERROR [STDERR] at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:242) 14:12:13,750 ERROR [STDERR] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276) 14:12:13,751 ERROR [STDERR] at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122) 14:12:13,751 ERROR [STDERR] at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212) 14:12:13,751 ERROR [STDERR] at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:191) 14:12:13,751 ERROR [STDERR] at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:134) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:458) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:162) 14:12:13,751 ERROR [STDERR] at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:171) 14:12:13,751 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl$WriteBehindStateWriter.write(ViewHandlerImpl.java:862) 14:12:13,751 ERROR [STDERR] at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:620) 14:12:13,751 ERROR [STDERR] at uIClasses.BDE_IAS_UIComboBox.encodeBegin(BDE_IAS_UIComboBox.java:1320) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930) 14:12:13,751 ERROR [STDERR] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) 14:12:13,751 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266) 14:12:13,752 ERROR [STDERR] at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197) 14:12:13,752 ERROR [STDERR] ... 34 more 14:12:13,752 ERROR [STDERR] Caused by: java.net.SocketException: Software caused connection abort: socket write error 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite0(Native Method) 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) 14:12:13,752 ERROR [STDERR] at java.net.SocketOutputStream.write(SocketOutputStream.java:136) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:297) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:286) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:748) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:736) 14:12:13,752 ERROR [STDERR] at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:89) 14:12:13,752 ERROR [STDERR] ... 73 more How can I avoid the double click event (without JS) or prevent this exception? I'm using JSF 1.2 and SSL. Thank you.
0
11,226,172
06/27/2012 12:26:28
1,138,891
01/09/2012 14:34:08
103
6
Zend redirector and module as subdomain
I have configured route for cms in my project to cms.m.dev resources.router.routes.cms.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.cms.route = "m.dev" resources.router.routes.cms.defaults.module = "cms" resources.router.routes.cms.chains.admin_default.route = "/:controller/:action/*" resources.router.routes.cms.chains.admin_default.defaults.action = "index" resources.router.routes.cms.chains.admin_default.defaults.controller = "dashboard" but now I have problem with redirector: $this->_redirector->gotoUrl('/doctor/edit/'); $this->_redirector->gotoSimple('edit', 'doctor', 'cms'); When I call it like this it redirects me to to **m.dev/cms/doctor/edit** instead of **cms.m.dev/doctor/edit** . Is there any way I can tell redirector that module is subdomain, not subdirectory?
zend-framework
module
routing
subdomain
null
null
open
Zend redirector and module as subdomain === I have configured route for cms in my project to cms.m.dev resources.router.routes.cms.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.cms.route = "m.dev" resources.router.routes.cms.defaults.module = "cms" resources.router.routes.cms.chains.admin_default.route = "/:controller/:action/*" resources.router.routes.cms.chains.admin_default.defaults.action = "index" resources.router.routes.cms.chains.admin_default.defaults.controller = "dashboard" but now I have problem with redirector: $this->_redirector->gotoUrl('/doctor/edit/'); $this->_redirector->gotoSimple('edit', 'doctor', 'cms'); When I call it like this it redirects me to to **m.dev/cms/doctor/edit** instead of **cms.m.dev/doctor/edit** . Is there any way I can tell redirector that module is subdomain, not subdirectory?
0
11,226,173
06/27/2012 12:26:30
906,358
08/22/2011 17:26:55
43
1
How to calculate the hours within an interval
We are building a report using ReportBuilder 3.0. In our database we have a start time and end time on a job being performed. In ReportBuilder 3.0 we would like to create a field that shows how much of the work time is within a certain interval. Example: start time: 20.00 - End time: 04.30 +1... how much is in the interval between 22.00 to 06.00 +1 = 6,5 hours. Does any one have a good example on how to create an expression that would give the result? Thanks
sql
expression
reportbuilder3.0
null
null
null
open
How to calculate the hours within an interval === We are building a report using ReportBuilder 3.0. In our database we have a start time and end time on a job being performed. In ReportBuilder 3.0 we would like to create a field that shows how much of the work time is within a certain interval. Example: start time: 20.00 - End time: 04.30 +1... how much is in the interval between 22.00 to 06.00 +1 = 6,5 hours. Does any one have a good example on how to create an expression that would give the result? Thanks
0
11,226,185
06/27/2012 12:27:05
1,028,138
11/03/2011 16:25:35
102
0
XSD annotations to latex
Is there a tool which takes an XSD schema with <annotation> and <documentation> tags and outputs a latex documentation from that? (before I start writing one myself...)
documentation
xsd
latex
null
null
null
open
XSD annotations to latex === Is there a tool which takes an XSD schema with <annotation> and <documentation> tags and outputs a latex documentation from that? (before I start writing one myself...)
0
11,226,186
06/27/2012 12:27:14
1,485,565
06/27/2012 12:06:50
1
0
output of Fragment shader as a texture
I have a problem with the fragment shader, this is my situation: I have a 3d scene with a simple 2d square representing a wall (with "GL.GL_QUADS") in the middle. I move the virtual camera using the function "glu.gluLookAt". I implemented a simple fragment shader for the wall that basically changes the color of the wall respect to the distance from the wall to the virtual camera (using dFdx and dFdy). The problem is that instead of visualize the output of the shader on the wall I would like to store the output in a buffer or in a texture. I tried with "gl.glBindFramebufferEXT" but in this case the output was the entire rendering of the virtual scene, not just the output of the shader referred to the wall. So how can I "extract" only the output of a fragment shader referred to a GL_QUADS without "extract" all the rendered scene? Thanks. Alberto
opengl
shader
jogl
null
null
null
open
output of Fragment shader as a texture === I have a problem with the fragment shader, this is my situation: I have a 3d scene with a simple 2d square representing a wall (with "GL.GL_QUADS") in the middle. I move the virtual camera using the function "glu.gluLookAt". I implemented a simple fragment shader for the wall that basically changes the color of the wall respect to the distance from the wall to the virtual camera (using dFdx and dFdy). The problem is that instead of visualize the output of the shader on the wall I would like to store the output in a buffer or in a texture. I tried with "gl.glBindFramebufferEXT" but in this case the output was the entire rendering of the virtual scene, not just the output of the shader referred to the wall. So how can I "extract" only the output of a fragment shader referred to a GL_QUADS without "extract" all the rendered scene? Thanks. Alberto
0
11,261,817
06/29/2012 12:30:46
1,451,330
06/12/2012 13:25:26
43
1
Special UIlabel design
I am developping an ios application and i would like to put a design to a UIlabel like this image. ![image](http://img4.hostingpics.net/thumbs/mini_388558Capturedcran20120629142330.png) Is it possible to do this ? Any idea ? thanks
objective-c
ios
null
null
null
null
open
Special UIlabel design === I am developping an ios application and i would like to put a design to a UIlabel like this image. ![image](http://img4.hostingpics.net/thumbs/mini_388558Capturedcran20120629142330.png) Is it possible to do this ? Any idea ? thanks
0
11,261,834
06/29/2012 12:32:14
1,056,284
11/20/2011 11:10:07
134
7
How to apply two CCActions to two different CCSprites and run them in the same time on one CCLayer?
Actually the question is in the title. Anyway I would like to repeat it:<br> **Question:** How I could apply two different CCActions to two different CCSprites and run them in the same time on one CCLayer? Thanks in advance!
objective-c
xcode
cocos2d-iphone
ccsprite
null
null
open
How to apply two CCActions to two different CCSprites and run them in the same time on one CCLayer? === Actually the question is in the title. Anyway I would like to repeat it:<br> **Question:** How I could apply two different CCActions to two different CCSprites and run them in the same time on one CCLayer? Thanks in advance!
0
11,261,854
06/29/2012 12:33:47
52,751
01/08/2009 03:06:09
2,283
26
Data dumper for perl more concise than Data::Dumper?
I'm trying to print some parse trees, and `Data::Dumper` is very verbose for that, for example printing: { 'A' => { 'ID' => 'y' }, 'OP' => '=', 'B' => { 'NUM' => '5' } }, rather than let's say: { 'A' => {'ID' => 'y'}, 'OP' => '=', 'B' => {'NUM' => '5'} }, and it's very hard to read since it take massive number of lines. Is there any Perl library which does what `Data::Dumper` does except more tersely, or do I need to write my own?
perl
data-dumper
null
null
null
null
open
Data dumper for perl more concise than Data::Dumper? === I'm trying to print some parse trees, and `Data::Dumper` is very verbose for that, for example printing: { 'A' => { 'ID' => 'y' }, 'OP' => '=', 'B' => { 'NUM' => '5' } }, rather than let's say: { 'A' => {'ID' => 'y'}, 'OP' => '=', 'B' => {'NUM' => '5'} }, and it's very hard to read since it take massive number of lines. Is there any Perl library which does what `Data::Dumper` does except more tersely, or do I need to write my own?
0
11,261,855
06/29/2012 12:33:51
633,000
02/24/2011 19:43:54
2,612
203
Canceling Button AutoPostBack - Specifics of OnClientClick implementation
When using a standard asp:Button component, it is necessary to use the following technique to cancel an automatic postback (or make a postback conditionally): - Specify the client-side operations via the Button.OnClientClick property; - Implement a logic that returns a Boolean value that indicates whether or not a postback should performed. The following does not cancel a postback (despite of the "OnClientClickHandler" method returns "false"): <asp:Button ID="btn" runat="server" OnClientClick="OnClientClickHandler();" /> function OnClientClickHandler() { return false; } The following implementation does: <asp:Button ID="btn" runat="server" OnClientClick="return OnClientClickHandler();" /> It looks like that this behavior is caused by specifics of the JavaScript code scope. Anyway, I am interested in the low-level implementation details of this scenario.
javascript
asp.net
submit
null
null
null
open
Canceling Button AutoPostBack - Specifics of OnClientClick implementation === When using a standard asp:Button component, it is necessary to use the following technique to cancel an automatic postback (or make a postback conditionally): - Specify the client-side operations via the Button.OnClientClick property; - Implement a logic that returns a Boolean value that indicates whether or not a postback should performed. The following does not cancel a postback (despite of the "OnClientClickHandler" method returns "false"): <asp:Button ID="btn" runat="server" OnClientClick="OnClientClickHandler();" /> function OnClientClickHandler() { return false; } The following implementation does: <asp:Button ID="btn" runat="server" OnClientClick="return OnClientClickHandler();" /> It looks like that this behavior is caused by specifics of the JavaScript code scope. Anyway, I am interested in the low-level implementation details of this scenario.
0
11,261,585
06/29/2012 12:13:30
1,351,297
04/23/2012 12:29:20
30
3
How to Test a IPhone Project?
im new to iPhone. Can any one tell the iphone unit step step by step procedure. i tried [this][1].but i have some errors like Undefined symbols for architecture i386: "_CLLocationCoordinate2DMake", referenced from: -[FileManager setLatitude:andLongitude:] in FileApiManager.o I hope i made some mistakes on my previous steps. can any one tell me a handy way or step wise procedure from how to configure the test project? Thanks in advance. [1]: http://developer.apple.com/library/ios/#DOCUMENTATION/DeveloperTools/Conceptual/UnitTesting/02-Setting_Up_Unit_Tests_in_a_Project/setting_up.html#//apple_ref/doc/uid/TP40002143-CH3-SW1
iphone
unit-testing
null
null
null
null
open
How to Test a IPhone Project? === im new to iPhone. Can any one tell the iphone unit step step by step procedure. i tried [this][1].but i have some errors like Undefined symbols for architecture i386: "_CLLocationCoordinate2DMake", referenced from: -[FileManager setLatitude:andLongitude:] in FileApiManager.o I hope i made some mistakes on my previous steps. can any one tell me a handy way or step wise procedure from how to configure the test project? Thanks in advance. [1]: http://developer.apple.com/library/ios/#DOCUMENTATION/DeveloperTools/Conceptual/UnitTesting/02-Setting_Up_Unit_Tests_in_a_Project/setting_up.html#//apple_ref/doc/uid/TP40002143-CH3-SW1
0
11,261,586
06/29/2012 12:13:36
1,043,973
11/13/2011 08:18:52
14
4
Store array in object in array
I want to retrieve multiple cells from an MySQL database. I currently put all my cells in an object which I put into an array which i send to the user. Now I want to retrieve all of them cells plus adding an array of different cells to the object. Kind looking like this: Array: Object:Apples:3, Pears:4, Array: Color:Green Color:Blue Object:Apples:5, Pears:15, Array: Color:Pink Color:Green Does it make sense? I don't know if this is the most efficient way of handling this but it would really make the work on the userend much simpler and hopefully faster.
php
mysql
null
null
null
06/29/2012 12:36:55
not a real question
Store array in object in array === I want to retrieve multiple cells from an MySQL database. I currently put all my cells in an object which I put into an array which i send to the user. Now I want to retrieve all of them cells plus adding an array of different cells to the object. Kind looking like this: Array: Object:Apples:3, Pears:4, Array: Color:Green Color:Blue Object:Apples:5, Pears:15, Array: Color:Pink Color:Green Does it make sense? I don't know if this is the most efficient way of handling this but it would really make the work on the userend much simpler and hopefully faster.
1
11,261,859
06/29/2012 12:34:24
147,437
07/29/2009 21:26:37
1,969
171
Create Oracle partitioning table without PK
We have a huge table which are 144 million rows available right now an also increasing 1 million rows each day. I would like to create a partitioning table on Oracle 11G server but I am not aware of the techniques. So I have two question : 1. Is it possible to create a partitioning table from a table that doesn't available PK? 2. What is your suggestion to create a partitioning table like huge records?
oracle
partitioning
null
null
null
null
open
Create Oracle partitioning table without PK === We have a huge table which are 144 million rows available right now an also increasing 1 million rows each day. I would like to create a partitioning table on Oracle 11G server but I am not aware of the techniques. So I have two question : 1. Is it possible to create a partitioning table from a table that doesn't available PK? 2. What is your suggestion to create a partitioning table like huge records?
0
11,261,860
06/29/2012 12:34:29
1,309,830
04/03/2012 07:51:09
13
0
Wodpress menu strange issue
While customizing the wordpress menu I am having serious issues. $setup = array( 'menu' => '', 'container' => 'div', 'container_class' => 'menu', 'container_id' => 'menu', 'menu_class' => 'menu', 'menu_id' => 'menu', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s">%3$s</ul>', 'depth' => 0, 'walker' => '', 'theme_location' => '','theme_location' => 'primary' ); wp_nav_menu($setup); The issue: You can see in the code that I have setted the `menu_id` as "menu". OR `'menu_id' => 'menu'` But it is not applying, only the menu_class is applying the id is not for the menu container. But why???? Please help me
wordpress
null
null
null
null
null
open
Wodpress menu strange issue === While customizing the wordpress menu I am having serious issues. $setup = array( 'menu' => '', 'container' => 'div', 'container_class' => 'menu', 'container_id' => 'menu', 'menu_class' => 'menu', 'menu_id' => 'menu', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s">%3$s</ul>', 'depth' => 0, 'walker' => '', 'theme_location' => '','theme_location' => 'primary' ); wp_nav_menu($setup); The issue: You can see in the code that I have setted the `menu_id` as "menu". OR `'menu_id' => 'menu'` But it is not applying, only the menu_class is applying the id is not for the menu container. But why???? Please help me
0
11,692,904
07/27/2012 17:41:30
5,056
09/07/2008 15:43:17
13,555
264
Html5 LocalStorage: Read contents of FileEntry into a Blob
I need to read the contents of a FileEntry (which is a file) into a Blob. I know how to go the other direction using createWriter() but how do I go from FileEntry to a Blob?
html5
api
local-storage
null
null
null
open
Html5 LocalStorage: Read contents of FileEntry into a Blob === I need to read the contents of a FileEntry (which is a file) into a Blob. I know how to go the other direction using createWriter() but how do I go from FileEntry to a Blob?
0
11,692,908
07/27/2012 17:41:36
248,959
01/12/2010 14:34:00
2,779
26
Error running xmodmap ~/.xmodmap-`uname-n`
I have just installed xkeycaps and modify a key in my keyboard layout. So after saving it, xkeycaps says that i should modify the login script adding: xmodmap ~/.xmodmap-`uname-n` but when i run that line I get this: xmodmap ~/.xmodmap-`uname-n` uname-n: command not found xmodmap: unable to open file '/home/tirengarfio/.xmodmap-' for reading Any idea why that error?
linux
xmodmap
null
null
null
null
open
Error running xmodmap ~/.xmodmap-`uname-n` === I have just installed xkeycaps and modify a key in my keyboard layout. So after saving it, xkeycaps says that i should modify the login script adding: xmodmap ~/.xmodmap-`uname-n` but when i run that line I get this: xmodmap ~/.xmodmap-`uname-n` uname-n: command not found xmodmap: unable to open file '/home/tirengarfio/.xmodmap-' for reading Any idea why that error?
0
11,692,901
07/27/2012 17:41:27
1,552,209
07/25/2012 16:04:14
198
5
Installing Java On Ubuntu Server
Does anyone know the process to install java on Ubuntu? I have my server set up with Amazon in the cloud. I am looking to run some java servers on my server and quickly came to notice that I needed to install java. Can someone point me in the right direction with some steps? I have looked at some websites but in the command line when I enter sudo nano /etc/apt/source.list the file is a new file... I have read there is supposed to be an existing file. Correct? Thanks in advance. :)
java
cloud
server
null
null
07/28/2012 17:27:06
off topic
Installing Java On Ubuntu Server === Does anyone know the process to install java on Ubuntu? I have my server set up with Amazon in the cloud. I am looking to run some java servers on my server and quickly came to notice that I needed to install java. Can someone point me in the right direction with some steps? I have looked at some websites but in the command line when I enter sudo nano /etc/apt/source.list the file is a new file... I have read there is supposed to be an existing file. Correct? Thanks in advance. :)
2
11,692,909
07/27/2012 17:41:38
25,450
10/06/2008 10:50:51
10,165
180
Deploy Python programs on Windows and fetch big library dependencies
I have some small Python programs which depend on several big libraries, such as: * NumPy & SciPy * matplotlib * PyQt * OpenCV * PIL I'd like to make it easier to install these programs for Windows users. Currently I have two options: * either create _huge_ executable bundles with PyInstaller, py2exe or similar tool, * or write step-by-step manual installation instructions. Executable bundles are way too big. I always feel like there is some magic happening, which may or may not work the next time I use a different library or a new library version. I dislike wasted space too. Manual installation is too easy to do wrong, there are too many steps: _download this particular interpreter version, download numpy, scipy, pyqt, pil binaries, make sure they all are built for the same python version and the same platform, install one after another, download and unpack OpenCV, copy its .pyd file deep inside Python installation, setup environment variables and file asssociations..._ You see, few users will have the patience and self-confidence to do all this. What I'd like to do: distribute only a small Python source and, probably, an installation script, which fetches and installs all the _missing_ dependencies (correct versions, correct platform, installs them in the right order). That's a trivial task with any Linux package manager, but I just don't know which tools can accomplish it on Windows. Are there simple tools which can generate Windows installers from a list of URLs of dependencies<sup>1</sup>? <sup>1</sup> _As you may have noticed, most of the libraries I listed are not installable with pip/easy\_install, but require to run their own installers and modify some files and environment variables._
python
windows
deployment
opencv
numpy
null
open
Deploy Python programs on Windows and fetch big library dependencies === I have some small Python programs which depend on several big libraries, such as: * NumPy & SciPy * matplotlib * PyQt * OpenCV * PIL I'd like to make it easier to install these programs for Windows users. Currently I have two options: * either create _huge_ executable bundles with PyInstaller, py2exe or similar tool, * or write step-by-step manual installation instructions. Executable bundles are way too big. I always feel like there is some magic happening, which may or may not work the next time I use a different library or a new library version. I dislike wasted space too. Manual installation is too easy to do wrong, there are too many steps: _download this particular interpreter version, download numpy, scipy, pyqt, pil binaries, make sure they all are built for the same python version and the same platform, install one after another, download and unpack OpenCV, copy its .pyd file deep inside Python installation, setup environment variables and file asssociations..._ You see, few users will have the patience and self-confidence to do all this. What I'd like to do: distribute only a small Python source and, probably, an installation script, which fetches and installs all the _missing_ dependencies (correct versions, correct platform, installs them in the right order). That's a trivial task with any Linux package manager, but I just don't know which tools can accomplish it on Windows. Are there simple tools which can generate Windows installers from a list of URLs of dependencies<sup>1</sup>? <sup>1</sup> _As you may have noticed, most of the libraries I listed are not installable with pip/easy\_install, but require to run their own installers and modify some files and environment variables._
0