PostId
int64 13
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 3
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -33
210k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
5.77k
| Title
stringlengths 10
250
| BodyMarkdown
stringlengths 12
30k
| Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 47
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,486,620 |
12/20/2010 03:19:14
| 306,719 |
04/01/2010 08:57:51
| 317 | 1 |
RandomAccessFile probelm
|
I have to listern a file,when its content is added,I will read the new line,and work on the content of the new line.
The file's length will never decrease.(in fact, it is the tomcat log file).
I use the following codes:
----------------------------------------
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import org.apache.log4j.Logger;
import com.zjswkj.analyser.ddao.LogEntryDao;
import com.zjswkj.analyser.model.LogEntry;
import com.zjswkj.analyser.parser.LogParser;
public class ListenTest {
private RandomAccessFile raf;
private long lastPosition;
private String logEntryPattern = "^([\\d.]+) (\\S+) (\\S+) \\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\S+) \"([^\"]+)\" \"([^\"]+)\"";
private static Logger log = Logger.getLogger(ListenTest.class);
public void startListenLogOfCurrentDay() {
try {
if (raf == null)
raf = new RandomAccessFile(
"/tmp/logs/localhost_access_log.2010-12-20.txt",
"r");
String line;
while (true) {
raf.seek(lastPosition);
while ((line = raf.readLine()) != null) {
if (!line.matches(logEntryPattern)) {
// not a complete line,roll back
lastPosition = raf.getFilePointer() - line.getBytes().length;
log.debug("roll back:" + line.getBytes().length + " bytes");
if (line.equals(""))
continue;
log.warn("broken line:[" + line + "]");
Thread.sleep(2000);
} else {
// save it
LogEntry le = LogParser.parseLog(line);
LogEntryDao.saveLogEntry(le);
lastPosition = raf.getFilePointer();
}
}
}
} catch (FileNotFoundException e) {
log.error("can not find log file of today");
} catch (IOException e) {
log.error("IO Exception:" + e.getMessage());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new ListenTest().startListenLogOfCurrentDay();
}
}
--------------------------------
Now,my problem is that,if a line which is being written to the file's new line is not completed,a dead loop will occur.
For example,if the tomcat try to write to the file a new line:
10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
And when only one part of the line is written(for example:<**10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672**>),now since it can not match the pattern I defined,that's to say,tomcat do not complete its writting work,so I will try to roll back the filepointer,and sleep 2 seconds and then read again.
During the sleep time,the last part of the line maybe written yet(in fact I write them rather than tomcat for test),in my opinion,randomaccessfile will read a new line which can match the pattern,however it seems not.
Any one can have a check the codes?
**NOTE**:the log file's format is "combined" like this:
10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
|
java
|
loops
|
io
|
random-access
| null | null |
open
|
RandomAccessFile probelm
===
I have to listern a file,when its content is added,I will read the new line,and work on the content of the new line.
The file's length will never decrease.(in fact, it is the tomcat log file).
I use the following codes:
----------------------------------------
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import org.apache.log4j.Logger;
import com.zjswkj.analyser.ddao.LogEntryDao;
import com.zjswkj.analyser.model.LogEntry;
import com.zjswkj.analyser.parser.LogParser;
public class ListenTest {
private RandomAccessFile raf;
private long lastPosition;
private String logEntryPattern = "^([\\d.]+) (\\S+) (\\S+) \\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\S+) \"([^\"]+)\" \"([^\"]+)\"";
private static Logger log = Logger.getLogger(ListenTest.class);
public void startListenLogOfCurrentDay() {
try {
if (raf == null)
raf = new RandomAccessFile(
"/tmp/logs/localhost_access_log.2010-12-20.txt",
"r");
String line;
while (true) {
raf.seek(lastPosition);
while ((line = raf.readLine()) != null) {
if (!line.matches(logEntryPattern)) {
// not a complete line,roll back
lastPosition = raf.getFilePointer() - line.getBytes().length;
log.debug("roll back:" + line.getBytes().length + " bytes");
if (line.equals(""))
continue;
log.warn("broken line:[" + line + "]");
Thread.sleep(2000);
} else {
// save it
LogEntry le = LogParser.parseLog(line);
LogEntryDao.saveLogEntry(le);
lastPosition = raf.getFilePointer();
}
}
}
} catch (FileNotFoundException e) {
log.error("can not find log file of today");
} catch (IOException e) {
log.error("IO Exception:" + e.getMessage());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new ListenTest().startListenLogOfCurrentDay();
}
}
--------------------------------
Now,my problem is that,if a line which is being written to the file's new line is not completed,a dead loop will occur.
For example,if the tomcat try to write to the file a new line:
10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
And when only one part of the line is written(for example:<**10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672**>),now since it can not match the pattern I defined,that's to say,tomcat do not complete its writting work,so I will try to roll back the filepointer,and sleep 2 seconds and then read again.
During the sleep time,the last part of the line maybe written yet(in fact I write them rather than tomcat for test),in my opinion,randomaccessfile will read a new line which can match the pattern,however it seems not.
Any one can have a check the codes?
**NOTE**:the log file's format is "combined" like this:
10.33.2.45 - - [08/Dec/2010:08:44:43 +0800] "GET /poi.txt HTTP/1.1" 200 672 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
| 0 |
512,684 |
02/04/2009 18:36:30
| 61,168 |
02/01/2009 11:06:06
| 309 | 12 |
Are insomnia, sleep debt, short sleep more prevalent among programmers ?
|
I know that some people are unable to function past a bedtime of, say, 10 or 11pm, and really need their 8 hours' sleep each night. I'm even married to someone like that.
I'm at the opposite end of the spectrum - often up late, tending to wake up fully refreshed after 6 hours sleep, able to go by on less, used to pull all-nighters at the drop of a hat when I was starting out as a coder.
Can anyone point me to research on the topic ? Does your own experience suggest that programmers have (as I've read somewhere) an anti-sleep culture ?
|
hygiene
|
sleep
|
research
| null | null |
02/04/2009 18:59:17
|
off topic
|
Are insomnia, sleep debt, short sleep more prevalent among programmers ?
===
I know that some people are unable to function past a bedtime of, say, 10 or 11pm, and really need their 8 hours' sleep each night. I'm even married to someone like that.
I'm at the opposite end of the spectrum - often up late, tending to wake up fully refreshed after 6 hours sleep, able to go by on less, used to pull all-nighters at the drop of a hat when I was starting out as a coder.
Can anyone point me to research on the topic ? Does your own experience suggest that programmers have (as I've read somewhere) an anti-sleep culture ?
| 2 |
6,238,590 |
06/04/2011 18:25:32
| 242,933 |
01/04/2010 02:28:02
| 2,086 | 114 |
Set Git submodule to shallow clone & sparse checkout?
|
Many vendor Objective-C libraries (e.g., `facebook-ios-sdk`) instruct you to copy a certain subset of its repo's files/dirs into your Xcode project. One problem with this is then you do not know what revision of the vendor code you have. Another is that if you make changes to the vendor code, it's not easy to contribute your changes via Git.
As a solution, I want to add each vendor library as a Git submodule of my project's repo with some extra settings (say, in the `.gitmodules` file). This way, if another person clones my project and does `git submodule update --init`, their repo & submodules will have the same state as mine because they'll be using the same default settings I set:
1. Sparse checkout: Only check out certain files of the submodule.
2. Shallow clone: Only clone a certain SHA1 of the submodule.
How do I set the above settings for a Git submodule?
|
git
|
github
|
clone
|
git-submodules
|
sparse-checkout
| null |
open
|
Set Git submodule to shallow clone & sparse checkout?
===
Many vendor Objective-C libraries (e.g., `facebook-ios-sdk`) instruct you to copy a certain subset of its repo's files/dirs into your Xcode project. One problem with this is then you do not know what revision of the vendor code you have. Another is that if you make changes to the vendor code, it's not easy to contribute your changes via Git.
As a solution, I want to add each vendor library as a Git submodule of my project's repo with some extra settings (say, in the `.gitmodules` file). This way, if another person clones my project and does `git submodule update --init`, their repo & submodules will have the same state as mine because they'll be using the same default settings I set:
1. Sparse checkout: Only check out certain files of the submodule.
2. Shallow clone: Only clone a certain SHA1 of the submodule.
How do I set the above settings for a Git submodule?
| 0 |
4,788,451 |
01/24/2011 23:35:20
| 203,170 |
11/05/2009 04:43:54
| 352 | 9 |
Mysql Select record where PRIMARY key = x
|
I have a primary key in my mysql table which is comprised of three columns.
CREATE TABLE IF NOT EXISTS `bb_bulletin` (
`OfficeCode` int(5) NOT NULL,
`IssuerId` int(11) NOT NULL,
`BulletinDtm` datetime NOT NULL,
`CategoryCode` varchar(4) NOT NULL,
`Title` varchar(255) NOT NULL,
`Content` text NOT NULL,
PRIMARY KEY (`OfficeCode`,`IssuerId`,`BulletinDtm`),
UNIQUE KEY `U_IssuerId` (`IssuerId`,`OfficeCode`,`BulletinDtm`),
UNIQUE KEY `U_CategoryCode` (`CategoryCode`,`OfficeCode`,`IssuerId`,`BulletinDtm`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Is there a shorthand method to select a record for a given value of the primary key.
I tried.
SELECT * FROM `bb_bulletin` WHERE PRIMARY = '20001-1-2011-01-07 14:04:40'
Instead of the long hand method of doing,
SELECT * From bb_bulletin WHERE OfficeCode = 20001 AND IssuerId = 1 AND BulletinDtm = 2011-01-07 14:04:40
Thanks a lot
|
mysql
|
composite-primary-key
| null | null | null | null |
open
|
Mysql Select record where PRIMARY key = x
===
I have a primary key in my mysql table which is comprised of three columns.
CREATE TABLE IF NOT EXISTS `bb_bulletin` (
`OfficeCode` int(5) NOT NULL,
`IssuerId` int(11) NOT NULL,
`BulletinDtm` datetime NOT NULL,
`CategoryCode` varchar(4) NOT NULL,
`Title` varchar(255) NOT NULL,
`Content` text NOT NULL,
PRIMARY KEY (`OfficeCode`,`IssuerId`,`BulletinDtm`),
UNIQUE KEY `U_IssuerId` (`IssuerId`,`OfficeCode`,`BulletinDtm`),
UNIQUE KEY `U_CategoryCode` (`CategoryCode`,`OfficeCode`,`IssuerId`,`BulletinDtm`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Is there a shorthand method to select a record for a given value of the primary key.
I tried.
SELECT * FROM `bb_bulletin` WHERE PRIMARY = '20001-1-2011-01-07 14:04:40'
Instead of the long hand method of doing,
SELECT * From bb_bulletin WHERE OfficeCode = 20001 AND IssuerId = 1 AND BulletinDtm = 2011-01-07 14:04:40
Thanks a lot
| 0 |
2,142,994 |
01/26/2010 22:02:57
| 238,581 |
12/25/2009 13:43:40
| 18 | 4 |
Very Simple Android Project - but where to start?
|
Planning to write a dead simple android application
it's basically an image viewing application.
I have 10 images preloaded. Each swipe (left or right) will cause the image to switch.
that's about it!
So I've looked across many android sites, couldn't find a single tutorial on this.
Anddev.org provided tutorials on displaying graphics, but that was in 2008 and many ppl reported errors due to version changes.
I'm also looking into the CommonsWare site, they have 3 books for 40 dollars/yr. I looked through the contents, but couldn't see anything that fits what I plan to write. Plus the books talk a lot about other stuff like GPS, HttpRequests, Servers, Databases -- none of which I need in my case.
Any tips on how I should tackle this?
Or do you guys already have written something similar to this?
|
android
| null | null | null | null |
07/27/2012 14:47:46
|
not a real question
|
Very Simple Android Project - but where to start?
===
Planning to write a dead simple android application
it's basically an image viewing application.
I have 10 images preloaded. Each swipe (left or right) will cause the image to switch.
that's about it!
So I've looked across many android sites, couldn't find a single tutorial on this.
Anddev.org provided tutorials on displaying graphics, but that was in 2008 and many ppl reported errors due to version changes.
I'm also looking into the CommonsWare site, they have 3 books for 40 dollars/yr. I looked through the contents, but couldn't see anything that fits what I plan to write. Plus the books talk a lot about other stuff like GPS, HttpRequests, Servers, Databases -- none of which I need in my case.
Any tips on how I should tackle this?
Or do you guys already have written something similar to this?
| 1 |
10,943,235 |
06/08/2012 04:53:21
| 1,331,172 |
04/13/2012 09:13:20
| 26 | 5 |
Can anyone help me to get good wordpress interview questions and answers.Any link or Resource?
|
Please reply as i am unable to get it?
|
wordpress
|
wordpress-plugin
| null | null | null |
06/26/2012 19:58:45
|
not constructive
|
Can anyone help me to get good wordpress interview questions and answers.Any link or Resource?
===
Please reply as i am unable to get it?
| 4 |
5,799,364 |
04/27/2011 04:29:10
| 263,357 |
02/01/2010 09:12:35
| 58 | 2 |
Visual Studio 2010 and ODP.NET error
|
Can someone please guide me to fix this problem while accessing "Server Explorer" ? I've tried reinstalling VS 2010 but no luck.
![enter image description here][1]
[1]: http://i.stack.imgur.com/A3qUP.png
|
visual-studio-2010
| null | null | null | null | null |
open
|
Visual Studio 2010 and ODP.NET error
===
Can someone please guide me to fix this problem while accessing "Server Explorer" ? I've tried reinstalling VS 2010 but no luck.
![enter image description here][1]
[1]: http://i.stack.imgur.com/A3qUP.png
| 0 |
10,403,555 |
05/01/2012 20:03:15
| 1,368,506 |
05/01/2012 19:53:12
| 1 | 0 |
Java: An array inside of an array?
|
I was wondering if I could have an array inside of an array? I can't think of a way to explain it.
if (numOfPlayers >= 2) {
this.config.getString("Tribute_one_spawn");
String[] onecoords = this.config.getString("Tribute_one_spawn").split(",");
Player Tribute_one = (Player)this.Playing.get(0);
World w = p.getWorld();
double x = Double.parseDouble(onecoords[0]);
double y = Double.parseDouble(onecoords[1]);
double z = Double.parseDouble(onecoords[2]);
Location oneloc = new Location(w, x, y, z);
Tribute_one.teleport(oneloc);
this.Frozen.add(Tribute_one);
Tribute_one.setFoodLevel(20);
this.config.getString("Tribute_two_spawn");
String[] twocoords = this.config.getString("Tribute_two_spawn").split(",");
Player Tribute_two = (Player)this.Playing.get(1);
World twow = p.getWorld();
double twox = Double.parseDouble(twocoords[0]);
double twoy = Double.parseDouble(twocoords[1]);
double twoz = Double.parseDouble(twocoords[2]);
Location twoloc = new Location(twow, twox, twoy, twoz);
Tribute_two.teleport(twoloc);
this.Frozen.add(Tribute_two);
Tribute_two.setFoodLevel(20);
}
if (numOfPlayers() >= 3) {
this.config.getString("Tribute_three_spawn");
String[] coords = this.config.getString("Tribute_three_spawn").split(",");
Player Tribute_three = (Player)this.Playing.get(2);
World w = p.getWorld();
double x = Double.parseDouble(coords[0]);
double y = Double.parseDouble(coords[1]);
double z = Double.parseDouble(coords[2]);
Location loc = new Location(w, x, y, z);
Tribute_three.teleport(loc);
this.Frozen.add(Tribute_three);
Tribute_three.setFoodLevel(20);
}
As you can see, I have to make a new array each in an if else ladder for every player. Instead of making 48 if statements is there a way I could alter the variable name of the coords Array to put it in a for loop with a counter incrementing the name of the array. Well that was a confusing way to explain it but that's the best I can do.
Thanks,
Bob
|
java
|
arrays
| null | null | null |
05/02/2012 16:43:31
|
not constructive
|
Java: An array inside of an array?
===
I was wondering if I could have an array inside of an array? I can't think of a way to explain it.
if (numOfPlayers >= 2) {
this.config.getString("Tribute_one_spawn");
String[] onecoords = this.config.getString("Tribute_one_spawn").split(",");
Player Tribute_one = (Player)this.Playing.get(0);
World w = p.getWorld();
double x = Double.parseDouble(onecoords[0]);
double y = Double.parseDouble(onecoords[1]);
double z = Double.parseDouble(onecoords[2]);
Location oneloc = new Location(w, x, y, z);
Tribute_one.teleport(oneloc);
this.Frozen.add(Tribute_one);
Tribute_one.setFoodLevel(20);
this.config.getString("Tribute_two_spawn");
String[] twocoords = this.config.getString("Tribute_two_spawn").split(",");
Player Tribute_two = (Player)this.Playing.get(1);
World twow = p.getWorld();
double twox = Double.parseDouble(twocoords[0]);
double twoy = Double.parseDouble(twocoords[1]);
double twoz = Double.parseDouble(twocoords[2]);
Location twoloc = new Location(twow, twox, twoy, twoz);
Tribute_two.teleport(twoloc);
this.Frozen.add(Tribute_two);
Tribute_two.setFoodLevel(20);
}
if (numOfPlayers() >= 3) {
this.config.getString("Tribute_three_spawn");
String[] coords = this.config.getString("Tribute_three_spawn").split(",");
Player Tribute_three = (Player)this.Playing.get(2);
World w = p.getWorld();
double x = Double.parseDouble(coords[0]);
double y = Double.parseDouble(coords[1]);
double z = Double.parseDouble(coords[2]);
Location loc = new Location(w, x, y, z);
Tribute_three.teleport(loc);
this.Frozen.add(Tribute_three);
Tribute_three.setFoodLevel(20);
}
As you can see, I have to make a new array each in an if else ladder for every player. Instead of making 48 if statements is there a way I could alter the variable name of the coords Array to put it in a for loop with a counter incrementing the name of the array. Well that was a confusing way to explain it but that's the best I can do.
Thanks,
Bob
| 4 |
7,316,914 |
09/06/2011 08:23:27
| 552,521 |
12/23/2010 15:22:15
| 295 | 12 |
how to write a JAVASCRIPT Parser in java
|
I want to write parser for JavaScript.
What I figured it out that I need to use some sort of scanning each character and as soon as I interact with any { , I must track for the next } (closing braces).
For efficient usage I can use stack.\
Can anyone suggest me some better idea or approach to build a parser for JavaScript through java.
|
java
|
javascript
|
parsing
| null | null |
09/06/2011 14:14:34
|
not a real question
|
how to write a JAVASCRIPT Parser in java
===
I want to write parser for JavaScript.
What I figured it out that I need to use some sort of scanning each character and as soon as I interact with any { , I must track for the next } (closing braces).
For efficient usage I can use stack.\
Can anyone suggest me some better idea or approach to build a parser for JavaScript through java.
| 1 |
3,874,382 |
10/06/2010 15:50:51
| 454,372 |
09/21/2010 19:49:49
| 6 | 0 |
Silverlight Image: how to invert or negated image colors?
|
The problem is how to invert colors of a Silverlight Image element.
There is an Image with a JPG as a source. On a button click I need to invert the colors. Sounds simple, right. Take each pixel, then modify it's value by 255 - pixel value. But when I tried WritableBitmap loaded with the Image source, I got security exception disallowing pixel access.
Here is my code:
if (MainLeftImage.Source != null)
{
WriteableBitmap bitmap = new WriteableBitmap((BitmapSource)MainLeftImage.Source);
byte[] pixels = new byte[bitmap.Pixels.Length];
int size = pixels.Count();
for (int i = 0; i < size; i++)
pixels[i] = (byte)(255 - pixels[i]);
bitmap.Invalidate();//redraw and then plug it back on
MainLeftImage.Source = bitmap;
}
}
catch (Exception ex)
{
}
Looks that WritableBitmap is not a solution, right?
Any help appreciated. Thanks guys.
|
silverlight
|
image-manipulation
| null | null | null | null |
open
|
Silverlight Image: how to invert or negated image colors?
===
The problem is how to invert colors of a Silverlight Image element.
There is an Image with a JPG as a source. On a button click I need to invert the colors. Sounds simple, right. Take each pixel, then modify it's value by 255 - pixel value. But when I tried WritableBitmap loaded with the Image source, I got security exception disallowing pixel access.
Here is my code:
if (MainLeftImage.Source != null)
{
WriteableBitmap bitmap = new WriteableBitmap((BitmapSource)MainLeftImage.Source);
byte[] pixels = new byte[bitmap.Pixels.Length];
int size = pixels.Count();
for (int i = 0; i < size; i++)
pixels[i] = (byte)(255 - pixels[i]);
bitmap.Invalidate();//redraw and then plug it back on
MainLeftImage.Source = bitmap;
}
}
catch (Exception ex)
{
}
Looks that WritableBitmap is not a solution, right?
Any help appreciated. Thanks guys.
| 0 |
6,903,625 |
08/01/2011 19:50:52
| 846,476 |
07/15/2011 12:45:54
| 1 | 0 |
Different tooltips for different parts of a component in Action Script
|
I want to have a tooltip that shows different things when the mouse goes over a different part of a component. For example if it is the top half of a component it will show one tooltip. If the mouse is on the bottom half of the segment then the tooltip will be another. I have some code I have written that returns a panel with string in. This code is on another computer so I'll post code tomorrow.
Is it possible in ActionScript to have different tooltips (or rather differnt values in a tooltip) for different parts of a segment?
Thanks
R
|
actionscript-3
|
actionscript
|
tooltip
|
mxml
| null | null |
open
|
Different tooltips for different parts of a component in Action Script
===
I want to have a tooltip that shows different things when the mouse goes over a different part of a component. For example if it is the top half of a component it will show one tooltip. If the mouse is on the bottom half of the segment then the tooltip will be another. I have some code I have written that returns a panel with string in. This code is on another computer so I'll post code tomorrow.
Is it possible in ActionScript to have different tooltips (or rather differnt values in a tooltip) for different parts of a segment?
Thanks
R
| 0 |
8,927,799 |
01/19/2012 14:31:45
| 101,562 |
05/05/2009 13:13:54
| 396 | 20 |
Actual type of a .dmp file
|
I get .dmp files every so often that I need to load in a database. Some of them are created with datapump and some with exp. Is there a simple way to tell them apart that I could put in a script?
|
oracle
|
exp
|
datapump
| null | null | null |
open
|
Actual type of a .dmp file
===
I get .dmp files every so often that I need to load in a database. Some of them are created with datapump and some with exp. Is there a simple way to tell them apart that I could put in a script?
| 0 |
8,589,160 |
12/21/2011 11:34:58
| 621,359 |
02/17/2011 12:21:26
| 3 | 0 |
Captur image through Canon camera using Java on Linux OS
|
I want to create a Java program that will access the camera and display the images to be shot on computer screen.
Java program will handle the camera for image capture or recording video.
Is there any free API available for this purpose that supports Linux OS as well?
I want to use Canon T3 DSLR camera.
Please suggest me.
|
java
| null | null | null | null | null |
open
|
Captur image through Canon camera using Java on Linux OS
===
I want to create a Java program that will access the camera and display the images to be shot on computer screen.
Java program will handle the camera for image capture or recording video.
Is there any free API available for this purpose that supports Linux OS as well?
I want to use Canon T3 DSLR camera.
Please suggest me.
| 0 |
2,222,673 |
02/08/2010 15:37:40
| 191,942 |
10/18/2009 08:20:42
| 938 | 60 |
Symmetric Key to Asymmetric key handoff
|
I'm not a cryptography expert, I actually only have a little bit of experience using it at all. Anyways, the time has come where one of my applications demands that I have some encryption set up. Please note, the program won't be managing anything super critical that will be able to cause a lot of damage.
Anyways, I was just trying to see if this scheme that I'm using is common and if there are flaws (of which there may be completely stupid & horribly flawed design, that's why I'm asking).
Ok, I have a client -> server communication. The Client I can hard code in the public portion of a 2048-bit RSA key. When the client wants to initiate a secure connection, he sends his username, md5 hash of his password, and a hash of a random UUID, all of which has been encrypted against the server's Public Key. The server receives the information and decrypts using its private key. Checks the database to see if his login + pass work & if they do, create a new entry in the "Sessions" table in the DB. This includes a SessionID, UID (user ID), and the UUID hash. Using the corresponding session ID's UUID as the keyphrase, the server will then send back a message that has the Blowfish encrypted word "Success!" + a random UUID (this message is Digitally Signed so we can determine if it came from the server or not). From that point on, when the client sends info to the server, it will be with a plaintext sess_id & include a Blowfish encrypted message, using the corresponding Session ID as the key to encrypt / decrypt.
Specifically, I am curious as to whether this system "should work" or if anyone notices that it's glaringly obvious that a vulnerability exists, such as MITM.
|
encryption
|
pki
|
blowfish
|
security
|
cryptography
| null |
open
|
Symmetric Key to Asymmetric key handoff
===
I'm not a cryptography expert, I actually only have a little bit of experience using it at all. Anyways, the time has come where one of my applications demands that I have some encryption set up. Please note, the program won't be managing anything super critical that will be able to cause a lot of damage.
Anyways, I was just trying to see if this scheme that I'm using is common and if there are flaws (of which there may be completely stupid & horribly flawed design, that's why I'm asking).
Ok, I have a client -> server communication. The Client I can hard code in the public portion of a 2048-bit RSA key. When the client wants to initiate a secure connection, he sends his username, md5 hash of his password, and a hash of a random UUID, all of which has been encrypted against the server's Public Key. The server receives the information and decrypts using its private key. Checks the database to see if his login + pass work & if they do, create a new entry in the "Sessions" table in the DB. This includes a SessionID, UID (user ID), and the UUID hash. Using the corresponding session ID's UUID as the keyphrase, the server will then send back a message that has the Blowfish encrypted word "Success!" + a random UUID (this message is Digitally Signed so we can determine if it came from the server or not). From that point on, when the client sends info to the server, it will be with a plaintext sess_id & include a Blowfish encrypted message, using the corresponding Session ID as the key to encrypt / decrypt.
Specifically, I am curious as to whether this system "should work" or if anyone notices that it's glaringly obvious that a vulnerability exists, such as MITM.
| 0 |
3,031,264 |
06/13/2010 06:05:49
| 365,550 |
06/13/2010 06:05:49
| 1 | 0 |
Community based translating system
|
Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP.
Any ideas?
|
php
|
translation
| null | null | null |
06/13/2010 09:59:44
|
off topic
|
Community based translating system
===
Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP.
Any ideas?
| 2 |
195,641 |
10/12/2008 16:13:14
| 16,039 |
09/17/2008 14:16:07
| 189 | 20 |
Windows could not start the Apache2 on Local Computer - problem
|
During the installation of Apache2 I got the following message into cmd window:
> Installing the Apache2.2 service The
> Apache2.2 service is successfully
> installed. Testing httpd.conf....
>
> Errors reported here must be corrected
> before the service can be started.
> httpd.exe: Could not reliably
> determine the server's fully qualified
> domain name , using 192.168.1.3 for
> ServerName (OS 10048)Only one usage of
> each socket address (protocol/network
> address/port) is normally permitted.
> : make_sock: could not bind to address
> 0.0.0.0:80 no listening sockets available, shutting down Unable to
> open logs Note the errors or messages
> above, and press the <ESC> key to
> exit. 24...
and after installing everything look fine, but it isn't. If I try to start service I got the following message:
> Windows could not start the Apache2 on
> Local Computer. For more information,
> review the System Event Log. If this
> is a non-Micorsoft service, contact
> the service vendor, and refer to
> service-specific error code 1.
Apach2 version is 2.2.9
Does anyone have the same problem, or could help me.
|
apache2
|
windows
|
windows-xp
| null | null | null |
open
|
Windows could not start the Apache2 on Local Computer - problem
===
During the installation of Apache2 I got the following message into cmd window:
> Installing the Apache2.2 service The
> Apache2.2 service is successfully
> installed. Testing httpd.conf....
>
> Errors reported here must be corrected
> before the service can be started.
> httpd.exe: Could not reliably
> determine the server's fully qualified
> domain name , using 192.168.1.3 for
> ServerName (OS 10048)Only one usage of
> each socket address (protocol/network
> address/port) is normally permitted.
> : make_sock: could not bind to address
> 0.0.0.0:80 no listening sockets available, shutting down Unable to
> open logs Note the errors or messages
> above, and press the <ESC> key to
> exit. 24...
and after installing everything look fine, but it isn't. If I try to start service I got the following message:
> Windows could not start the Apache2 on
> Local Computer. For more information,
> review the System Event Log. If this
> is a non-Micorsoft service, contact
> the service vendor, and refer to
> service-specific error code 1.
Apach2 version is 2.2.9
Does anyone have the same problem, or could help me.
| 0 |
6,741,007 |
07/19/2011 00:23:48
| 851,028 |
07/19/2011 00:17:23
| 1 | 0 |
ClickOnce publish problem,i look forward you reword!
|
vs2010
.net3.5 sp1
log below:
Installing using command 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD5E.tmp\DotNetFX35SP1\dotNetFx35setup.exe' and parameters ' /lang:chs /passive /norestart'
Process exited with code 1603
Status of package '.NET Framework 3.5 SP1' after install is 'InstallFailed'
|
clickonce
| null | null | null | null |
07/19/2011 13:12:06
|
not a real question
|
ClickOnce publish problem,i look forward you reword!
===
vs2010
.net3.5 sp1
log below:
Installing using command 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VSD5E.tmp\DotNetFX35SP1\dotNetFx35setup.exe' and parameters ' /lang:chs /passive /norestart'
Process exited with code 1603
Status of package '.NET Framework 3.5 SP1' after install is 'InstallFailed'
| 1 |
10,399,149 |
05/01/2012 14:29:45
| 1,002,584 |
10/19/2011 06:53:23
| 72 | 6 |
C# Showing XML data
|
Is there any component which can load XML fast?
I have already use textbox and webbrowser to show XML they work perfectly, but during to large amount of data of my XML (200MB) it takes me 30 Secs is there any other component which could show XML data faster?
|
c#
|
xml
| null | null | null |
05/02/2012 15:05:23
|
not constructive
|
C# Showing XML data
===
Is there any component which can load XML fast?
I have already use textbox and webbrowser to show XML they work perfectly, but during to large amount of data of my XML (200MB) it takes me 30 Secs is there any other component which could show XML data faster?
| 4 |
4,569,046 |
12/31/2010 08:40:44
| 559,101 |
12/31/2010 08:35:40
| 1 | 0 |
First learning asp.net mvc 3.0 is panic, we want to help
|
Currently our company using a asp.net mvc 3.0 rc2 development, the first contacts do not know where to start learning
|
c#
|
mvc
| null | null | null |
01/01/2011 01:26:07
|
not a real question
|
First learning asp.net mvc 3.0 is panic, we want to help
===
Currently our company using a asp.net mvc 3.0 rc2 development, the first contacts do not know where to start learning
| 1 |
2,866,313 |
05/19/2010 14:17:22
| 310,092 |
04/06/2010 14:15:25
| 161 | 17 |
Parallel programming, are we not learning from history again?
|
I started programming because I was a hardware guy that got bored, I thought the problems being solved in the software side of things were much more interesting than those in hardware. At that time, most of the electrical buses I dealt with were serial, some moving data as fast as 1.5 megabit!! ;)
Over the years these evolved into parallel buses in order to speed communication up, after all, transferring 8/16/32/64, whatever bits at a time incredibly speeds up the transfer. Well, our ability to create and detect state changes got faster and faster, to the point where we could push data so fast that interference between parallel traces or cable wires made cleaning the signal too expensive to continue, and we still got reasonable performance from serial interfaces, heck some graphics interfaces are even happening over USB for a while now.
I think I'm seeing a like trend in software now, our processors were getting faster and faster, so we got good at building "serial" software. Now we've hit a speed bump in raw processor speed, so we're adding cores, or "traces" to the mix, and spending a lot of time and effort on learning how to properly use those. But I'm also seeing what I feel are advances in things like optical switching and even quantum computing that could take us far more quickly that I was expecting back to the point where "serial programming" again makes the most sense.
What are your thoughts?
|
design
|
parallel-processing
| null | null | null |
05/20/2010 15:58:19
|
not a real question
|
Parallel programming, are we not learning from history again?
===
I started programming because I was a hardware guy that got bored, I thought the problems being solved in the software side of things were much more interesting than those in hardware. At that time, most of the electrical buses I dealt with were serial, some moving data as fast as 1.5 megabit!! ;)
Over the years these evolved into parallel buses in order to speed communication up, after all, transferring 8/16/32/64, whatever bits at a time incredibly speeds up the transfer. Well, our ability to create and detect state changes got faster and faster, to the point where we could push data so fast that interference between parallel traces or cable wires made cleaning the signal too expensive to continue, and we still got reasonable performance from serial interfaces, heck some graphics interfaces are even happening over USB for a while now.
I think I'm seeing a like trend in software now, our processors were getting faster and faster, so we got good at building "serial" software. Now we've hit a speed bump in raw processor speed, so we're adding cores, or "traces" to the mix, and spending a lot of time and effort on learning how to properly use those. But I'm also seeing what I feel are advances in things like optical switching and even quantum computing that could take us far more quickly that I was expecting back to the point where "serial programming" again makes the most sense.
What are your thoughts?
| 1 |
6,541,056 |
06/30/2011 21:01:21
| 815,560 |
06/25/2011 18:10:38
| 48 | 3 |
How to test if a point inside area with lat/lon and radius using Java?
|
I've to write a method that has the following signature
public class Position {
double longitude;
double latitude;
}
boolean isInsideTheArea(Position center, double radius, Position point);
So if `point` is inside the `area` that has the `center` as its center and `radius` as its radius in **miles**, this should return `true`, `false` otherwise.
|
java
|
latitude-longitude
|
point
|
area
|
inside
| null |
open
|
How to test if a point inside area with lat/lon and radius using Java?
===
I've to write a method that has the following signature
public class Position {
double longitude;
double latitude;
}
boolean isInsideTheArea(Position center, double radius, Position point);
So if `point` is inside the `area` that has the `center` as its center and `radius` as its radius in **miles**, this should return `true`, `false` otherwise.
| 0 |
7,331,651 |
09/07/2011 09:35:35
| 320,615 |
04/19/2010 17:46:03
| 14,140 | 524 |
Find the owner of a file in unix
|
Is there a way to get just the file's owner and group, separated by space in unix shell?
I'm trying to write a script to find the owner of all the files in a directory and print it (in a specific format, can't use `ls -la`).
|
unix
| null | null | null | null |
09/08/2011 00:14:01
|
off topic
|
Find the owner of a file in unix
===
Is there a way to get just the file's owner and group, separated by space in unix shell?
I'm trying to write a script to find the owner of all the files in a directory and print it (in a specific format, can't use `ls -la`).
| 2 |
8,458,740 |
12/10/2011 18:12:25
| 1,091,510 |
12/10/2011 18:05:19
| 1 | 0 |
Variable creation in Java
|
Please explain how I can create a variable in US short date format (like MM-DD-YY -> 05-12-94).
Also please explain what type of variable (is in int?) is it -> 000000001
Thanks!
|
java
|
variables
| null | null | null |
12/10/2011 18:18:07
|
too localized
|
Variable creation in Java
===
Please explain how I can create a variable in US short date format (like MM-DD-YY -> 05-12-94).
Also please explain what type of variable (is in int?) is it -> 000000001
Thanks!
| 3 |
11,446,060 |
07/12/2012 06:23:03
| 1,005,396 |
10/20/2011 14:20:43
| 108 | 7 |
Autocomplete search with most searched for search terms
|
I want search to autocomplete users search, when they type something and I want the autocomplete to be based on what users search for the most... Like google does.
How would you accomplish something like this in rails?
I'm using rails 3.2 and I use a mongo database with Mongoid.
|
ruby-on-rails
|
ruby
|
ruby-on-rails-3
|
search
|
mongoid
|
07/12/2012 13:05:59
|
not a real question
|
Autocomplete search with most searched for search terms
===
I want search to autocomplete users search, when they type something and I want the autocomplete to be based on what users search for the most... Like google does.
How would you accomplish something like this in rails?
I'm using rails 3.2 and I use a mongo database with Mongoid.
| 1 |
4,295,094 |
11/28/2010 02:59:27
| 496,949 |
11/04/2010 08:45:00
| 1,106 | 1 |
some files in output directory are locked even the executable is stop running
|
I found sometime some files in output directory is locked even after executable finishes running. I have to restart the Visual studio to solve it. Is there simple way to get out from there?
|
visual-studio
|
visual-studio-2008
|
visual-studio-2010
| null | null |
12/01/2010 07:23:17
|
not a real question
|
some files in output directory are locked even the executable is stop running
===
I found sometime some files in output directory is locked even after executable finishes running. I have to restart the Visual studio to solve it. Is there simple way to get out from there?
| 1 |
7,005,309 |
08/10/2011 02:42:47
| 887,059 |
08/10/2011 02:42:47
| 1 | 0 |
android listview intent
|
I am not able to create an intent after click in my Listview. After completing It gives an error "the application has stopped unexpetedly, please try again"
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent IntentDiscution = new Intent(view.getContext(), lstchoi.class);
IntentDiscution.setClass(InterfaceAcceuil.this, lstchoi.class);
startActivityForResult(IntentDiscution, 0);
|
android
| null | null | null | null | null |
open
|
android listview intent
===
I am not able to create an intent after click in my Listview. After completing It gives an error "the application has stopped unexpetedly, please try again"
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent IntentDiscution = new Intent(view.getContext(), lstchoi.class);
IntentDiscution.setClass(InterfaceAcceuil.this, lstchoi.class);
startActivityForResult(IntentDiscution, 0);
| 0 |
9,077,432 |
01/31/2012 09:52:33
| 530,039 |
12/04/2010 00:16:14
| 22 | 0 |
Jasper Reports put an image to the corner of another image
|
I have a Jasper Reports application. I need to put a small image like a logo on all other images in the report. Since I have to put it to all other ones I cannot decide the position statically. It will be something like this. By the way, I don't use Dynamic Jasper and it will take a lot of time to move to Dynamic Jasper, so don't advise it please. Is there any workaround I can do?
![enter image description here][1]
[1]: http://i.stack.imgur.com/Omurd.jpg
|
jasper-reports
| null | null | null | null | null |
open
|
Jasper Reports put an image to the corner of another image
===
I have a Jasper Reports application. I need to put a small image like a logo on all other images in the report. Since I have to put it to all other ones I cannot decide the position statically. It will be something like this. By the way, I don't use Dynamic Jasper and it will take a lot of time to move to Dynamic Jasper, so don't advise it please. Is there any workaround I can do?
![enter image description here][1]
[1]: http://i.stack.imgur.com/Omurd.jpg
| 0 |
4,128,596 |
11/08/2010 22:12:16
| 418,617 |
08/12/2010 15:55:03
| 45 | 6 |
Popular Blackberry web app
|
Do you know any popular Blackberry web app out there.
I've searched in Google but haven't found any (just feel strange).
|
web-applications
|
blackberry
| null | null | null |
11/09/2010 17:27:52
|
off topic
|
Popular Blackberry web app
===
Do you know any popular Blackberry web app out there.
I've searched in Google but haven't found any (just feel strange).
| 2 |
10,830,075 |
05/31/2012 08:37:34
| 1,393,277 |
05/14/2012 08:25:13
| 1 | 0 |
android : is it possible to have the path to access to the thumbnails of the photo from the gallery?
|
I'm developing an app where i need to display the thumbnails of the photo of the gallery. Now I'm creating my own thumbnails but the thing is that it takes memory and it crashes the app when running in old phones which don't have enough free memory.
Some help will be very appreciated.
|
android
|
path
|
gallery
|
photo
|
thumbnails
| null |
open
|
android : is it possible to have the path to access to the thumbnails of the photo from the gallery?
===
I'm developing an app where i need to display the thumbnails of the photo of the gallery. Now I'm creating my own thumbnails but the thing is that it takes memory and it crashes the app when running in old phones which don't have enough free memory.
Some help will be very appreciated.
| 0 |
8,891,276 |
01/17/2012 07:53:46
| 861,602 |
07/25/2011 12:49:48
| 1,184 | 54 |
SQL LIMIT to get latest records
|
I am writing a script which will list 25 items of all 12 categories. Database structure is like:
tbl_items
---------------------------------------------
item_id | item_name | item_value | timestamp
---------------------------------------------
tbl_categories
-----------------------------
cat_id | item_id | timestamp
-----------------------------
There are around 600000 rows in the table tbl_items. I am using sql query :
$sql = "SELECT e.item_id, e.item_value FROM tbl_items AS e JOIN tbl_categories AS cat WHERE e.item_id=cat.item_id AND cat.cat_id=6001 LIMIT 25";
Using same query in a loop for cat_id from 6000 to 6012. But i want latest records of every category. If i use something like
$sql = "SELECT e.item_id, e.item_value FROM tbl_items AS e JOIN tbl_categories AS cat WHERE e.item_id=cat.item_id AND cat.cat_id=6001 ORDER BY e.timestamp LIMIT 25";
query goes not computing for approx 10 minutes which is not acceptable.
can i use a limit more nicely to give latest 25 records for each category?
Please can any one guide me how can i achieve this thing without ORDER BY clause.
Any ideas or help will be highly appreciated.
|
mysql
|
sql
|
limit
|
latest
| null | null |
open
|
SQL LIMIT to get latest records
===
I am writing a script which will list 25 items of all 12 categories. Database structure is like:
tbl_items
---------------------------------------------
item_id | item_name | item_value | timestamp
---------------------------------------------
tbl_categories
-----------------------------
cat_id | item_id | timestamp
-----------------------------
There are around 600000 rows in the table tbl_items. I am using sql query :
$sql = "SELECT e.item_id, e.item_value FROM tbl_items AS e JOIN tbl_categories AS cat WHERE e.item_id=cat.item_id AND cat.cat_id=6001 LIMIT 25";
Using same query in a loop for cat_id from 6000 to 6012. But i want latest records of every category. If i use something like
$sql = "SELECT e.item_id, e.item_value FROM tbl_items AS e JOIN tbl_categories AS cat WHERE e.item_id=cat.item_id AND cat.cat_id=6001 ORDER BY e.timestamp LIMIT 25";
query goes not computing for approx 10 minutes which is not acceptable.
can i use a limit more nicely to give latest 25 records for each category?
Please can any one guide me how can i achieve this thing without ORDER BY clause.
Any ideas or help will be highly appreciated.
| 0 |
279,221 |
11/10/2008 21:19:20
| 1,096,640 |
09/08/2008 13:10:56
| 58 | 7 |
Convert a Picture Box image to a Byte Array in VB6
|
I have a VB6 picture box that gets an image from a video capture device.
I'm trying to figure out how to then convert the picture box to a byte array.
|
vb6
|
bytearray
| null | null | null | null |
open
|
Convert a Picture Box image to a Byte Array in VB6
===
I have a VB6 picture box that gets an image from a video capture device.
I'm trying to figure out how to then convert the picture box to a byte array.
| 0 |
7,051,314 |
08/13/2011 15:17:57
| 882,995 |
08/07/2011 17:52:10
| 1 | 0 |
How to pass the values in hyperlink using php?
|
Can anybody tell me how to pass values in the hyperlink using php script.
|
php5
| null | null | null | null |
08/18/2011 14:19:31
|
not a real question
|
How to pass the values in hyperlink using php?
===
Can anybody tell me how to pass values in the hyperlink using php script.
| 1 |
4,108,079 |
11/05/2010 16:47:35
| 157,872 |
08/17/2009 16:25:55
| 241 | 10 |
Best format to receive data
|
What's the best alternative to read data of any kind in my iphone app ?
I want my client to be able to pass me the data for me to include in the app and read it easily.
What's best ?, XML ?, plist ?, other format ?, I'm not very informed in the matter.
Thanks.
|
iphone
|
xml
|
xcode
|
plist
| null |
04/18/2012 12:07:31
|
not constructive
|
Best format to receive data
===
What's the best alternative to read data of any kind in my iphone app ?
I want my client to be able to pass me the data for me to include in the app and read it easily.
What's best ?, XML ?, plist ?, other format ?, I'm not very informed in the matter.
Thanks.
| 4 |
8,635,486 |
12/26/2011 11:54:54
| 917,389 |
08/29/2011 07:54:12
| 25 | 0 |
Best database administration tool with web-interface
|
I am writing a web application with a mysql backend.
So far i use the command line tool over ssh. But this is a little bit unhandy and in some places the ssh port is closed. So im now looking for a database administration tool with a web-interface.
I know phpmyadmin. But are there any good/better alternatives? I want to compare them to find my favorite tool. Which one would you suggest?
|
database
|
administration
|
web-interface
| null | null |
12/28/2011 03:32:44
|
not constructive
|
Best database administration tool with web-interface
===
I am writing a web application with a mysql backend.
So far i use the command line tool over ssh. But this is a little bit unhandy and in some places the ssh port is closed. So im now looking for a database administration tool with a web-interface.
I know phpmyadmin. But are there any good/better alternatives? I want to compare them to find my favorite tool. Which one would you suggest?
| 4 |
9,959,812 |
03/31/2012 21:24:33
| 1,293,577 |
03/15/2011 01:55:13
| 1 | 0 |
Why can't the type or namespace be found on IIS 7 server when it works fine on the local machine?
|
I am using DynamicPDF creator, Visual Studio 2010, and IIS 7.
On my local machine, the line "using ceTe.DynamicPDF;" and subsequent lines work fine, but
when I try to load the page on my server, I get the following error:
"Compiler Error Message: CS0246: The type or namespace name 'ceTe' could not be found (are you missing a using directive or an assembly reference?)"
I have added the .dll file as a reference, and intellisense even works.
I am wondering if it is a problem with assemblies. Any ideas about what I should do to get this working on my server?
|
c#
|
asp.net
|
dll
|
iis7
|
namespaces
| null |
open
|
Why can't the type or namespace be found on IIS 7 server when it works fine on the local machine?
===
I am using DynamicPDF creator, Visual Studio 2010, and IIS 7.
On my local machine, the line "using ceTe.DynamicPDF;" and subsequent lines work fine, but
when I try to load the page on my server, I get the following error:
"Compiler Error Message: CS0246: The type or namespace name 'ceTe' could not be found (are you missing a using directive or an assembly reference?)"
I have added the .dll file as a reference, and intellisense even works.
I am wondering if it is a problem with assemblies. Any ideas about what I should do to get this working on my server?
| 0 |
3,306,106 |
07/22/2010 05:51:13
| 339,020 |
05/12/2010 06:54:26
| 35 | 3 |
how can we set the background color in datatable through codebehind?
|
I am binding my data in a datatable and then bind that datatable into a datagrid.I want that some rows of datatable should be highlighted with some color how can we do that fron code behind?
|
c#
|
asp.net
| null | null | null | null |
open
|
how can we set the background color in datatable through codebehind?
===
I am binding my data in a datatable and then bind that datatable into a datagrid.I want that some rows of datatable should be highlighted with some color how can we do that fron code behind?
| 0 |
4,764,917 |
01/21/2011 23:25:46
| 582,298 |
01/20/2011 00:33:55
| 11 | 2 |
Wow64DisableWow64FsRedirection and GetNamedSecurityInfo - unavoidable ERROR_BAD_EXE_FORMAT?
|
I am using `Wow64DisableWow64FsRedirection` / `Wow64RevertWow64FsRedirection` to disable and restore WOW-64 file redirection (making system32\ to syswow64\ and some registry changes). The MSDN page warns that you should use these pairs very close together because they effect all I/O operations, including loading DLLs.
I have used these successfully for quite some time, but now have come up against a seemingly impossible situation. The function I am trying to call is `GetNamedSecurityInfo` which takes a file path. The file path will frequently be into the system32 folder so I need to disable redirection. However, if I disable redirection the function returns `ERROR_BAD_EXE_FORMAT`.
I have tried to pre-load the DLL it is in with `LoadLibrary(TEXT("Advapi32.dll"))` but that didn't help. My guess is that it is loading another DLL within `GetNamedSecurityInfo` but I don't know which.
So here is the question now. What is the best way to handle this situation? Should I just pre-load all possible DLLs before using `Wow64DisableWow64FsRedirection`? Is there a better way?
Thanks.
|
c++
|
winapi
|
wow64
| null | null | null |
open
|
Wow64DisableWow64FsRedirection and GetNamedSecurityInfo - unavoidable ERROR_BAD_EXE_FORMAT?
===
I am using `Wow64DisableWow64FsRedirection` / `Wow64RevertWow64FsRedirection` to disable and restore WOW-64 file redirection (making system32\ to syswow64\ and some registry changes). The MSDN page warns that you should use these pairs very close together because they effect all I/O operations, including loading DLLs.
I have used these successfully for quite some time, but now have come up against a seemingly impossible situation. The function I am trying to call is `GetNamedSecurityInfo` which takes a file path. The file path will frequently be into the system32 folder so I need to disable redirection. However, if I disable redirection the function returns `ERROR_BAD_EXE_FORMAT`.
I have tried to pre-load the DLL it is in with `LoadLibrary(TEXT("Advapi32.dll"))` but that didn't help. My guess is that it is loading another DLL within `GetNamedSecurityInfo` but I don't know which.
So here is the question now. What is the best way to handle this situation? Should I just pre-load all possible DLLs before using `Wow64DisableWow64FsRedirection`? Is there a better way?
Thanks.
| 0 |
8,420,134 |
12/07/2011 17:56:23
| 441,736 |
09/07/2010 18:44:12
| 149 | 4 |
Asset Piplines issues upgrading to Rails 3.1.3 - Application already initialized
|
I'm unable to get rake precompile tasks running with Rails 3.1.3. I get the following error
$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/tristankromer/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/tristankromer/.rvm/gems/ruby-1.9.2-p290@toomanyninjas/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
rake aborted!
Application has been already initialized.
/Users/tristankromer/.rvm/gems/ruby-1.9.2-p290@toomanyninjas/gems/railties-3.1.3/lib/rails/application.rb:95:in `initialize!'
Not quite sure where to start on this one. Any ideas?
|
ruby-on-rails
|
ruby
|
ruby-on-rails-3
|
ruby-on-rails-3.1
|
asset-pipeline
| null |
open
|
Asset Piplines issues upgrading to Rails 3.1.3 - Application already initialized
===
I'm unable to get rake precompile tasks running with Rails 3.1.3. I get the following error
$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/tristankromer/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/tristankromer/.rvm/gems/ruby-1.9.2-p290@toomanyninjas/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
rake aborted!
Application has been already initialized.
/Users/tristankromer/.rvm/gems/ruby-1.9.2-p290@toomanyninjas/gems/railties-3.1.3/lib/rails/application.rb:95:in `initialize!'
Not quite sure where to start on this one. Any ideas?
| 0 |
5,116,198 |
02/25/2011 10:38:36
| 153,626 |
08/10/2009 09:47:51
| 397 | 2 |
Wordpress - How to get any type posts include attachments by ids?
|
I need to get any posts by an id list ($id_list), here is my codes
query_posts(array('posts_per_page'=>-1,
'caller_get_posts'=>1,
'post_type'=>'any',
'post__in'=>$id_list)
);
i got posts and pages by this query, but attachments don't get included, i guess they are filtered by 'post__in'.
How do i get them all?
|
php
|
wordpress
| null | null | null | null |
open
|
Wordpress - How to get any type posts include attachments by ids?
===
I need to get any posts by an id list ($id_list), here is my codes
query_posts(array('posts_per_page'=>-1,
'caller_get_posts'=>1,
'post_type'=>'any',
'post__in'=>$id_list)
);
i got posts and pages by this query, but attachments don't get included, i guess they are filtered by 'post__in'.
How do i get them all?
| 0 |
5,340,274 |
03/17/2011 14:17:28
| 475,353 |
10/14/2010 05:20:48
| 809 | 31 |
Oracle created in C or Java?
|
So i've looked around online trying to figure out if Oracle(Database) was created in C/C++ or Java?
I've gotten answers saying either or, but not a definite answer?
seems like it should've been written in C, but then again im not sure. I even looked on their site and I can't find any information.
Thanks
|
java
|
sql
|
c
|
oracle
| null |
03/17/2011 14:24:37
|
off topic
|
Oracle created in C or Java?
===
So i've looked around online trying to figure out if Oracle(Database) was created in C/C++ or Java?
I've gotten answers saying either or, but not a definite answer?
seems like it should've been written in C, but then again im not sure. I even looked on their site and I can't find any information.
Thanks
| 2 |
11,483,215 |
07/14/2012 11:01:22
| 958,429 |
09/22/2011 06:35:10
| 180 | 1 |
SQL Query must return rows from Product Master and 2 other tables
|
I've got 3 tables:
1)ProductMaster
2)SalesTY (Sales This Year)
3)SalesLY (Sales Last Year)
I'm trying to create a query which will return all the rows from the ProductMaster and then the sales from this year and then the sales from last year. The problem is some products from this year is new and some products from last year is not available anymore, but I've got to list all the prodcuts, so it must look like this:
**Product - TY - LY**
aaaa - 1000 - 0
bbbb - 0 - 1000
select
i.Product
,b1.TrnMonth
,b1.TrnYear
,b1.TY
,b2.LY
from Productmaster i
left join #ty b1
on i.Product= b1.Product
left join #ly b2
on i.Product= b2.Product
Group by i.Product
,b1.TrnMonth
,b1.TrnYear
|
sql
| null | null | null | null | null |
open
|
SQL Query must return rows from Product Master and 2 other tables
===
I've got 3 tables:
1)ProductMaster
2)SalesTY (Sales This Year)
3)SalesLY (Sales Last Year)
I'm trying to create a query which will return all the rows from the ProductMaster and then the sales from this year and then the sales from last year. The problem is some products from this year is new and some products from last year is not available anymore, but I've got to list all the prodcuts, so it must look like this:
**Product - TY - LY**
aaaa - 1000 - 0
bbbb - 0 - 1000
select
i.Product
,b1.TrnMonth
,b1.TrnYear
,b1.TY
,b2.LY
from Productmaster i
left join #ty b1
on i.Product= b1.Product
left join #ly b2
on i.Product= b2.Product
Group by i.Product
,b1.TrnMonth
,b1.TrnYear
| 0 |
5,220,028 |
03/07/2011 13:00:36
| 80,901 |
03/21/2009 17:12:22
| 4,887 | 337 |
GExperts grep expression for source lines with string literals (for translation)
|
How can I find all lines in Delphi source code using GExperts grep search which contain a string literal instead of a resource string, except those lines which are marked as `'do not translate'`?
Example:
this line should match
ShowMessage('Fatal error! Save all data and restart the application');
this line should not match
FieldByName('End Date').Clear; // do not translate
(Asking specifically about GExpert as it has a limited grep implementation afaik)
|
delphi
|
internationalization
|
grep
|
gexperts
| null | null |
open
|
GExperts grep expression for source lines with string literals (for translation)
===
How can I find all lines in Delphi source code using GExperts grep search which contain a string literal instead of a resource string, except those lines which are marked as `'do not translate'`?
Example:
this line should match
ShowMessage('Fatal error! Save all data and restart the application');
this line should not match
FieldByName('End Date').Clear; // do not translate
(Asking specifically about GExpert as it has a limited grep implementation afaik)
| 0 |
2,872,176 |
05/20/2010 08:44:49
| 267,679 |
02/06/2010 10:27:39
| 193 | 13 |
How to verify a jar signed with ant
|
Can i check signed file with ant?
i sign jar files with http://ant.apache.org/manual/CoreTasks/signjar.html and now i want to test it before to deploy it.
I can chek with
jarsigner -verify sbundle.jar
but i do not know if is possible with ant do that?
|
ant
|
signed
|
java
| null | null | null |
open
|
How to verify a jar signed with ant
===
Can i check signed file with ant?
i sign jar files with http://ant.apache.org/manual/CoreTasks/signjar.html and now i want to test it before to deploy it.
I can chek with
jarsigner -verify sbundle.jar
but i do not know if is possible with ant do that?
| 0 |
9,966,191 |
04/01/2012 16:44:19
| 910,182 |
08/24/2011 17:46:11
| 27 | 0 |
homebrew update irritating error message
|
When I do ...
brew update
I keep getting this error message ...
From https://github.com/mxcl/homebrew
25c0495..af1d9f1 master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
Library/Formula/postgresql.rb
Please, commit your changes or stash them before you can merge.
I wanted to find the file, and checkout the latest version but I can't even find the folder 'Formula'. Hmm.. So I uninstall postgresql and tried 'brew update' again but encounter same error.
Appreciate if anyone can help me out ?
|
git
|
postgresql
|
homebrew
| null | null |
05/22/2012 12:57:33
|
off topic
|
homebrew update irritating error message
===
When I do ...
brew update
I keep getting this error message ...
From https://github.com/mxcl/homebrew
25c0495..af1d9f1 master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
Library/Formula/postgresql.rb
Please, commit your changes or stash them before you can merge.
I wanted to find the file, and checkout the latest version but I can't even find the folder 'Formula'. Hmm.. So I uninstall postgresql and tried 'brew update' again but encounter same error.
Appreciate if anyone can help me out ?
| 2 |
755,579 |
04/16/2009 10:47:07
| 90,678 |
04/14/2009 14:08:02
| 1 | 0 |
ASP.NET MVC, Manipulating URL Structure.
|
In ASP.NET MVC, how do you get fine grain control over URL structure as you might with ISAPI Rewrite using RegEx?
|
asp.net-mvc
|
url-rewriting
|
friendly-url
| null | null | null |
open
|
ASP.NET MVC, Manipulating URL Structure.
===
In ASP.NET MVC, how do you get fine grain control over URL structure as you might with ISAPI Rewrite using RegEx?
| 0 |
10,267,277 |
04/22/2012 10:45:53
| 780,787 |
06/02/2011 08:26:12
| 46 | 0 |
Lyx 2.0.3 Mac Version unavailable article document class
|
I am trying to use Lyx 2.0.3 but for some reason it does not have the Document class article. Is there something else I need to install? I have installed texworks as well but for some reason it still can't find most of the document classes. An example of the error I get is
The module enumitem requires a package that is not available
in your laTex installation, or a converter that you have not installed.
LaTex output may not be possible. Missing Prerequisites:
enumitem.sty
So when I navigate to Document -> Settings, in the document class box most things are unavailable. Any advice would be great!
|
latex
|
lyx
| null | null | null |
04/22/2012 17:18:12
|
off topic
|
Lyx 2.0.3 Mac Version unavailable article document class
===
I am trying to use Lyx 2.0.3 but for some reason it does not have the Document class article. Is there something else I need to install? I have installed texworks as well but for some reason it still can't find most of the document classes. An example of the error I get is
The module enumitem requires a package that is not available
in your laTex installation, or a converter that you have not installed.
LaTex output may not be possible. Missing Prerequisites:
enumitem.sty
So when I navigate to Document -> Settings, in the document class box most things are unavailable. Any advice would be great!
| 2 |
8,315,561 |
11/29/2011 18:11:23
| 1,010,202 |
10/24/2011 03:38:06
| 11 | 0 |
Placing youtube widget inside jquery ui tabs, not loading videos on IE and Firefox
|
I am trying to place a youtube widget given by youtube inside jquery UI tabs. The widget works fine with all browsers when I place the widget outside the tab divs as I have shown here. But the same embed code is not loading the youtube Video thumbnails and not showing the title of the video properly in IE6,7 and firefox when I place them inside the tab divs.
Please Help
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Integration</title>
<link rel="stylesheet" href="css/jquery-ui-1.8.16.custom.css">
<script src="js/jquery-1.6.2.js"></script>
<script src="js/jquery.ui.core.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.ui.tabs.js"></script>
<link rel="stylesheet" href="css/demos.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery.flash.js"></script>
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body >
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1"> Follow us on Foursquare </a></li>
<li><a href="#tabs-2">Watch our videos on YouTube </a></li>
</ul>
<div id="tabs-1">
<!-- a foursquare widget which works--->
<div id="tabs-2" >
<!--placing it inside -->
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=**YOURCHANNEL**&synd=open&w=400&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js">
</script>
</div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!--placing it outside -->
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=**YOURCHANNEL**&synd=open&w=400&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js">
</script>
</body>
</html>
|
jquery
|
jquery-ui
|
embed
| null | null | null |
open
|
Placing youtube widget inside jquery ui tabs, not loading videos on IE and Firefox
===
I am trying to place a youtube widget given by youtube inside jquery UI tabs. The widget works fine with all browsers when I place the widget outside the tab divs as I have shown here. But the same embed code is not loading the youtube Video thumbnails and not showing the title of the video properly in IE6,7 and firefox when I place them inside the tab divs.
Please Help
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Integration</title>
<link rel="stylesheet" href="css/jquery-ui-1.8.16.custom.css">
<script src="js/jquery-1.6.2.js"></script>
<script src="js/jquery.ui.core.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.ui.tabs.js"></script>
<link rel="stylesheet" href="css/demos.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery.flash.js"></script>
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body >
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tabs-1"> Follow us on Foursquare </a></li>
<li><a href="#tabs-2">Watch our videos on YouTube </a></li>
</ul>
<div id="tabs-1">
<!-- a foursquare widget which works--->
<div id="tabs-2" >
<!--placing it inside -->
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=**YOURCHANNEL**&synd=open&w=400&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js">
</script>
</div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!--placing it outside -->
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=**YOURCHANNEL**&synd=open&w=400&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js">
</script>
</body>
</html>
| 0 |
965,454 |
06/08/2009 15:26:31
| 3,882 |
08/31/2008 16:07:51
| 14 | 2 |
Why is Eclipse using JUnit 3 when I have junit-4.3.1.jar in my build path?
|
I'm using Ganymede on Ubuntu Linux and I have junit-4.3.1.jar in my build path. I click FIle > New > Java > "JUnit 4 Test Case" when I create a new test, but when it's run, Eclipse appears to be using JUnit 3. I believe this is the case because it's ignoring my annotations.
When I remove all test* methods, JUnit complains "No tests found".
How do I force Eclipse Ganymede to use JUnit 4?
|
junit
|
unit-testing
|
eclipse
| null | null | null |
open
|
Why is Eclipse using JUnit 3 when I have junit-4.3.1.jar in my build path?
===
I'm using Ganymede on Ubuntu Linux and I have junit-4.3.1.jar in my build path. I click FIle > New > Java > "JUnit 4 Test Case" when I create a new test, but when it's run, Eclipse appears to be using JUnit 3. I believe this is the case because it's ignoring my annotations.
When I remove all test* methods, JUnit complains "No tests found".
How do I force Eclipse Ganymede to use JUnit 4?
| 0 |
8,330,701 |
11/30/2011 18:05:13
| 330,733 |
05/02/2010 09:08:42
| 425 | 11 |
D concurrent writing to buffer
|
Say you have a buffer of size N which must be set to definite values (say to zero, or something else). This value setting in the buffer is divided over M threads, each handling N / M elements of the buffer.
The buffer cannot be `immutable`, since we change the values. Message passing won't work either, since it is forbidden to pass ref or array (= pointer) types. So it must happen through `shared`? No, since in my case the buffer elements are of type `creal` and thus arithmetics are not atomic.
At the end, the main program must wait until all threads are finished. It is given that each thread only writes to a subset of the array and none of the threads have overlap in the array with another thread or in any way depend on eachother.
How would I go about writing to (or modifying) a buffer in a concurrent manner?
PS: sometimes I can simply divide the array in M consecutive pieces, but sometimes I go over the array (the array is 1D but represents 2D data) column-by-column. Which makes the individual arrays the threads use be actually interleaved in the mother-array. Argh.
|
concurrency
|
buffer
|
d
| null | null | null |
open
|
D concurrent writing to buffer
===
Say you have a buffer of size N which must be set to definite values (say to zero, or something else). This value setting in the buffer is divided over M threads, each handling N / M elements of the buffer.
The buffer cannot be `immutable`, since we change the values. Message passing won't work either, since it is forbidden to pass ref or array (= pointer) types. So it must happen through `shared`? No, since in my case the buffer elements are of type `creal` and thus arithmetics are not atomic.
At the end, the main program must wait until all threads are finished. It is given that each thread only writes to a subset of the array and none of the threads have overlap in the array with another thread or in any way depend on eachother.
How would I go about writing to (or modifying) a buffer in a concurrent manner?
PS: sometimes I can simply divide the array in M consecutive pieces, but sometimes I go over the array (the array is 1D but represents 2D data) column-by-column. Which makes the individual arrays the threads use be actually interleaved in the mother-array. Argh.
| 0 |
5,730,040 |
04/20/2011 12:13:00
| 703,952 |
04/12/2011 11:25:55
| 17 | 0 |
Could anyone tell me the basics about the differencies of the browsers?
|
Why is it that when you work with different browsers, there's usually different results? Why is simple HTML/css being read differently by the traditional browsers (IE, Mozilla, Chrome and Safari)?
I'm sorry if this question doesn't belong here. I just though you guys would be the best source of this type of information :)
Have a nice day!
|
internet-explorer
|
firefox
|
browser
|
google-chrome
|
safari
|
04/20/2011 21:37:05
|
off topic
|
Could anyone tell me the basics about the differencies of the browsers?
===
Why is it that when you work with different browsers, there's usually different results? Why is simple HTML/css being read differently by the traditional browsers (IE, Mozilla, Chrome and Safari)?
I'm sorry if this question doesn't belong here. I just though you guys would be the best source of this type of information :)
Have a nice day!
| 2 |
5,287,283 |
03/13/2011 03:52:14
| 655,995 |
02/28/2011 02:13:21
| 1 | 0 |
if you know xpath then please help?
|
I want titles of songs from this web page how can I do that? here is the link:
http://mp3bear.com/?q=yahoo+and
so what I did table/tr/td[2] but nothing is showing up
any help would be apritated
thanks,
Tushar Chutani
|
javascript
|
html
|
xpath
|
html-parsing
| null |
03/14/2011 19:40:00
|
not a real question
|
if you know xpath then please help?
===
I want titles of songs from this web page how can I do that? here is the link:
http://mp3bear.com/?q=yahoo+and
so what I did table/tr/td[2] but nothing is showing up
any help would be apritated
thanks,
Tushar Chutani
| 1 |
1,086,729 |
07/06/2009 12:34:52
| 113,535 |
05/28/2009 04:53:22
| 500 | 44 |
When will IE6 no longer be supported?
|
As we all know supporting IE6 with its many well documented quirks is painful but a necessary part of development and supporting with web based technologies. My question is “does anyone know when IE6 is scheduled for end of official Microsoft support (or retirement) or if Microsoft will force an update to IE7 or IE8”?
|
internet-explorer
|
internet-explorer-6
| null | null | null |
07/06/2009 12:51:12
|
off topic
|
When will IE6 no longer be supported?
===
As we all know supporting IE6 with its many well documented quirks is painful but a necessary part of development and supporting with web based technologies. My question is “does anyone know when IE6 is scheduled for end of official Microsoft support (or retirement) or if Microsoft will force an update to IE7 or IE8”?
| 2 |
8,365,873 |
12/03/2011 05:54:51
| 1,078,645 |
12/03/2011 05:31:25
| 1 | 0 |
what is order of compiling a class in java
|
what is order of compiling a below class
> import java.text.DateFormat;
> import java.text.ParseException;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
>
>
> public class FindoutDtDiff {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> DateFormat df = new SimpleDateFormat ("dd-MMM-yyyy");
> long days=0;
> try {
> Date oldDate=df.parse("31-Mar-2011");
> Date newDate=df.parse("01-May-2011");
> days=((oldDate.getTime()-newDate.getTime())/(24*60*60*1000));
> System.out.println(days);
> } catch (ParseException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
> }
>
> }
In the above example ,when the class will be intializied and what order to compile above class from import onwards?.
|
java
| null | null | null | null |
12/03/2011 07:45:00
|
not a real question
|
what is order of compiling a class in java
===
what is order of compiling a below class
> import java.text.DateFormat;
> import java.text.ParseException;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
>
>
> public class FindoutDtDiff {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> DateFormat df = new SimpleDateFormat ("dd-MMM-yyyy");
> long days=0;
> try {
> Date oldDate=df.parse("31-Mar-2011");
> Date newDate=df.parse("01-May-2011");
> days=((oldDate.getTime()-newDate.getTime())/(24*60*60*1000));
> System.out.println(days);
> } catch (ParseException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
> }
>
> }
In the above example ,when the class will be intializied and what order to compile above class from import onwards?.
| 1 |
9,865,871 |
03/26/2012 02:19:09
| 1,060,036 |
11/22/2011 15:02:56
| 81 | 0 |
Which library to use for https?
|
I was wondering which library are available for https sending and receiving in C?
I would like to create a program that will load a website. A program that will load Yahoo with a click of a button. A program that will promote me for search term and when I enter it and it will go to the first results of Google and display the information.
|
c
|
knowledge
| null | null | null |
03/27/2012 14:45:10
|
not constructive
|
Which library to use for https?
===
I was wondering which library are available for https sending and receiving in C?
I would like to create a program that will load a website. A program that will load Yahoo with a click of a button. A program that will promote me for search term and when I enter it and it will go to the first results of Google and display the information.
| 4 |
9,198,995 |
02/08/2012 18:08:50
| 178,925 |
09/25/2009 07:44:46
| 689 | 13 |
How to compute the number of char, line by line
|
I need a Ruby program that, given a file as parameter, returns a hash or array that gives the number of char, line by line.
How to do this elegantly in Ruby ?
JCLL
|
ruby
| null | null | null | null | null |
open
|
How to compute the number of char, line by line
===
I need a Ruby program that, given a file as parameter, returns a hash or array that gives the number of char, line by line.
How to do this elegantly in Ruby ?
JCLL
| 0 |
7,160,604 |
08/23/2011 11:52:16
| 322,456 |
04/21/2010 15:43:47
| 16 | 1 |
Flash library for math equations and graphs, like DragMath and PetitGrapheur
|
I'm working on e-learning solution and our project requires free or commercial component for math formulas and graphs rendering.
Use cases are:
- built in flash or flex;
- compose math equlation like in in http://www.dragmath.bham.ac.uk/demo.html
- graph rendering like in http://xxi.ac-reims.fr/javamaths/Grapheur/PetitGrapheur.html
- pure client side solution;
So far I found:
1. http://code.google.com/p/mathmlformula/ - really cool, but UI controls are missing (controls like in DragMath).
2. http://validi.fi/latex2flash - but it requires server-side access.
Please help me with your experience.
|
flash
|
math
|
formula
| null | null | null |
open
|
Flash library for math equations and graphs, like DragMath and PetitGrapheur
===
I'm working on e-learning solution and our project requires free or commercial component for math formulas and graphs rendering.
Use cases are:
- built in flash or flex;
- compose math equlation like in in http://www.dragmath.bham.ac.uk/demo.html
- graph rendering like in http://xxi.ac-reims.fr/javamaths/Grapheur/PetitGrapheur.html
- pure client side solution;
So far I found:
1. http://code.google.com/p/mathmlformula/ - really cool, but UI controls are missing (controls like in DragMath).
2. http://validi.fi/latex2flash - but it requires server-side access.
Please help me with your experience.
| 0 |
8,968,270 |
01/23/2012 07:15:37
| 1,164,466 |
01/23/2012 07:12:48
| 1 | 0 |
What is the architecture
|
I am new to web development. Read about n tier architecture and have a very basic doubt. My project uses SQL Server with stored procedures and sql functions to access the data. The code for accessing these stored procedures and functions and the business logic are combined into a single dll. The aspx code behind calls the dll. Is this a 3 tier or 2 tier architecture? Since we are using stored procedures , what would be the advantages of having a separate DB access layer. Will having a separate DB access layer improve the performance?
Kavya
|
.net
|
architecture
| null | null | null |
01/23/2012 11:32:18
|
not constructive
|
What is the architecture
===
I am new to web development. Read about n tier architecture and have a very basic doubt. My project uses SQL Server with stored procedures and sql functions to access the data. The code for accessing these stored procedures and functions and the business logic are combined into a single dll. The aspx code behind calls the dll. Is this a 3 tier or 2 tier architecture? Since we are using stored procedures , what would be the advantages of having a separate DB access layer. Will having a separate DB access layer improve the performance?
Kavya
| 4 |
9,309,147 |
02/16/2012 10:02:23
| 648,938 |
03/07/2011 22:34:22
| 509 | 29 |
Facebook authentication redirection loop
|
I'm trying to add the ability to share the product that you just purchased to my website using the [Facebook C# SDK][1]. To do this you need to authenticate the user with Facebook and get the required permissions.
I've got some code which checks if you're authenticated, if not, redirects you to the Facebook oAuth page to authenticate.
However, when the page returns from Facebook, it goes into a redirect loop:
var auth = new FacebookWebAuthorizer();
bool authorized = auth.FacebookWebRequest.IsAuthorized(new string[] { "publish_stream" });
if (authorized)
{
var client = new FacebookClient(auth.FacebookWebRequest.AccessToken);
Dictionary<string, object> args = new Dictionary<string, object>();
args["message"] = "This is a test.";
args["name"] = "";
args["link"] = "http://www.example.com/";
args["description"] = "Test link.";
client.Post("/me/feed", args);
}
else
{
var facebookClient = new FacebookOAuthClient();
var parameters = new Dictionary<string, object> {
{ "redirect_uri", "http://www.example.com/" },
{ "client_id", "xxxx" },
{ "scope", "publish_stream" }
};
Response.Redirect(facebookClient.GetLoginUrl(parameters).ToString(), true);
}
My web.config looks like this:
<configuration>
<configSections>
<section name="facebookSettings" type="Facebook.FacebookConfigurationSection" />
</configSections>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
</handlers>
</system.webServer>
<facebookSettings appId="xxxx" appSecret="xxxx" />
</configuration>
It looks like my site isn't recognising that I'm already authenticated, so it redirects to the Facebook login. Facebook then knows that I'm authenticated, so it redirects me back, causing the loop.
[1]: https://github.com/facebook-csharp-sdk/facebook-csharp-sdk
|
c#
|
facebook
|
facebook-c#-sdk
| null | null | null |
open
|
Facebook authentication redirection loop
===
I'm trying to add the ability to share the product that you just purchased to my website using the [Facebook C# SDK][1]. To do this you need to authenticate the user with Facebook and get the required permissions.
I've got some code which checks if you're authenticated, if not, redirects you to the Facebook oAuth page to authenticate.
However, when the page returns from Facebook, it goes into a redirect loop:
var auth = new FacebookWebAuthorizer();
bool authorized = auth.FacebookWebRequest.IsAuthorized(new string[] { "publish_stream" });
if (authorized)
{
var client = new FacebookClient(auth.FacebookWebRequest.AccessToken);
Dictionary<string, object> args = new Dictionary<string, object>();
args["message"] = "This is a test.";
args["name"] = "";
args["link"] = "http://www.example.com/";
args["description"] = "Test link.";
client.Post("/me/feed", args);
}
else
{
var facebookClient = new FacebookOAuthClient();
var parameters = new Dictionary<string, object> {
{ "redirect_uri", "http://www.example.com/" },
{ "client_id", "xxxx" },
{ "scope", "publish_stream" }
};
Response.Redirect(facebookClient.GetLoginUrl(parameters).ToString(), true);
}
My web.config looks like this:
<configuration>
<configSections>
<section name="facebookSettings" type="Facebook.FacebookConfigurationSection" />
</configSections>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
</handlers>
</system.webServer>
<facebookSettings appId="xxxx" appSecret="xxxx" />
</configuration>
It looks like my site isn't recognising that I'm already authenticated, so it redirects to the Facebook login. Facebook then knows that I'm authenticated, so it redirects me back, causing the loop.
[1]: https://github.com/facebook-csharp-sdk/facebook-csharp-sdk
| 0 |
209,211 |
10/16/2008 16:02:23
| 4,481 |
09/04/2008 02:59:09
| 623 | 32 |
Best XSLT Editor &| Debugger
|
Other than Visual Studio, what tool have you found best to create, edit, maintain, and possibly debug your XSLT files?
I work on a fairly big project and we have tons of XSLT files and they have grown quite complex in their implementation.
The language seems so brittle. It would be nice to navigate and identify errors more quickly.
|
xslt
|
editor
|
freeware
|
debugging
| null |
09/13/2011 12:52:24
|
not constructive
|
Best XSLT Editor &| Debugger
===
Other than Visual Studio, what tool have you found best to create, edit, maintain, and possibly debug your XSLT files?
I work on a fairly big project and we have tons of XSLT files and they have grown quite complex in their implementation.
The language seems so brittle. It would be nice to navigate and identify errors more quickly.
| 4 |
9,781,793 |
03/20/2012 05:32:54
| 579,980 |
01/18/2011 13:13:32
| 856 | 34 |
How to make hardware sizing sheet?
|
We build some software platform, and now we need to make hardware sizing sheet for the server-side piece of this software. So, I should prepare some mathematical model that, for example, given the number of concurrent users, can predict the number of physical servers or storage capacity or network bandwidth. How to make such model?
|
architecture
|
sizing
| null | null | null |
03/20/2012 07:03:46
|
off topic
|
How to make hardware sizing sheet?
===
We build some software platform, and now we need to make hardware sizing sheet for the server-side piece of this software. So, I should prepare some mathematical model that, for example, given the number of concurrent users, can predict the number of physical servers or storage capacity or network bandwidth. How to make such model?
| 2 |
996,464 |
06/15/2009 14:35:23
| 71,145 |
02/26/2009 00:15:06
| 63 | 5 |
.NET MVC jQuery relative path for window.location
|
I have a real simple problem, but can't seem to figure it out.
The following doesn't work because of the way MVC builds the URL (It includes all the route information). I want pathname to return the virtual directory path only.
All I'm doing is redirecting to a different route when a user selects an ID from a drop down list.
$(document).ready(function() {
$('#TransactionIds').change(function() {
document.location = window.location.pathname + "/CeuTransaction/Index/" + $('#TransactionIds').val();
});
});
|
.net
|
mvc
|
jquery
| null | null | null |
open
|
.NET MVC jQuery relative path for window.location
===
I have a real simple problem, but can't seem to figure it out.
The following doesn't work because of the way MVC builds the URL (It includes all the route information). I want pathname to return the virtual directory path only.
All I'm doing is redirecting to a different route when a user selects an ID from a drop down list.
$(document).ready(function() {
$('#TransactionIds').change(function() {
document.location = window.location.pathname + "/CeuTransaction/Index/" + $('#TransactionIds').val();
});
});
| 0 |
1,900,930 |
12/14/2009 13:29:06
| 86,138 |
04/02/2009 10:51:49
| 131 | 1 |
WCF Service to receive XML message
|
I want to create a WCF service that accepts an XML message that interoperates with a non MS consumer. Now, I could expose a method that accepts a string and then handle the XML from that point onwards. Is there a better approach than using a string parameter?
Thanks
|
.net
|
wcf
| null | null | null | null |
open
|
WCF Service to receive XML message
===
I want to create a WCF service that accepts an XML message that interoperates with a non MS consumer. Now, I could expose a method that accepts a string and then handle the XML from that point onwards. Is there a better approach than using a string parameter?
Thanks
| 0 |
9,120,406 |
02/02/2012 21:38:46
| 256,234 |
01/21/2010 22:04:12
| 46 | 4 |
How can I set default arguments for "ls" in Linux?
|
Im constantly doing "ls -ahl" whenever I want to list what is in the directory. Is there a way for me to make -ahl the default args passed when I do "ls" or should I just create an alias like "alias lsa=ls -ahl" in bash_profile?
|
linux
|
ls
| null | null | null |
02/02/2012 21:43:13
|
off topic
|
How can I set default arguments for "ls" in Linux?
===
Im constantly doing "ls -ahl" whenever I want to list what is in the directory. Is there a way for me to make -ahl the default args passed when I do "ls" or should I just create an alias like "alias lsa=ls -ahl" in bash_profile?
| 2 |
6,553,004 |
07/01/2011 20:39:38
| 120,102 |
06/09/2009 20:00:20
| 444 | 24 |
Simulate null parameters in Freemarker macros
|
I'm building a site using Freemarker and have started heavily using macros. I know in Freemarker 2.3 that passing a null value into a macro as a parameter is equivalent to not passing a parameter at all so I've created a global variable called "null" to simulate null checking in my macros:
<#assign null="NUL" />
Now in my macros I can do this:
<#maco doSomething param1=null>
<#if param1 != null>
<div>WIN!</div>
</#if>
</#macro>
The problem comes if I want to pass a parameter that isn't a scalar. For instance, passing a List (which in Freemarker is a SimpleSequence) to a macro and checking against my null keyword yields the error:
> freemarker.template.TemplateException:
> The only legal comparisons are between
> two numbers, two strings, or two
> dates. Left hand operand is a
> freemarker.template.SimpleSequence
> Right hand operand is a
> freemarker.template.SimpleScalar
I took a look at the freemarker code and I can see the issue (ComparisonExpression.isTrue()):
if(ltm instanceof TemplateNumberModel && rtm instanceof TemplateNumberModel) {
...
}
else if(ltm instanceof TemplateDateModel && rtm instanceof TemplateDateModel) {
...
}
else if(ltm instanceof TemplateScalarModel && rtm instanceof TemplateScalarModel) {
...
}
else if(ltm instanceof TemplateBooleanModel && rtm instanceof TemplateBooleanModel) {
...
}
// Here we handle compatibility issues
else if(env.isClassicCompatible()) {
...
}
else {
throw new TemplateException("The only legal comparisons...", env);
}
So the only solution I can think of is to set isClassicCompatible to true, which I think will call toString() on both objects and compare the result. However, the documentation specifically says anything relying on old features should be rewritten.
My quesion is, is there a solution to this that doesn't rely on deprecated features?
|
freemarker
| null | null | null | null | null |
open
|
Simulate null parameters in Freemarker macros
===
I'm building a site using Freemarker and have started heavily using macros. I know in Freemarker 2.3 that passing a null value into a macro as a parameter is equivalent to not passing a parameter at all so I've created a global variable called "null" to simulate null checking in my macros:
<#assign null="NUL" />
Now in my macros I can do this:
<#maco doSomething param1=null>
<#if param1 != null>
<div>WIN!</div>
</#if>
</#macro>
The problem comes if I want to pass a parameter that isn't a scalar. For instance, passing a List (which in Freemarker is a SimpleSequence) to a macro and checking against my null keyword yields the error:
> freemarker.template.TemplateException:
> The only legal comparisons are between
> two numbers, two strings, or two
> dates. Left hand operand is a
> freemarker.template.SimpleSequence
> Right hand operand is a
> freemarker.template.SimpleScalar
I took a look at the freemarker code and I can see the issue (ComparisonExpression.isTrue()):
if(ltm instanceof TemplateNumberModel && rtm instanceof TemplateNumberModel) {
...
}
else if(ltm instanceof TemplateDateModel && rtm instanceof TemplateDateModel) {
...
}
else if(ltm instanceof TemplateScalarModel && rtm instanceof TemplateScalarModel) {
...
}
else if(ltm instanceof TemplateBooleanModel && rtm instanceof TemplateBooleanModel) {
...
}
// Here we handle compatibility issues
else if(env.isClassicCompatible()) {
...
}
else {
throw new TemplateException("The only legal comparisons...", env);
}
So the only solution I can think of is to set isClassicCompatible to true, which I think will call toString() on both objects and compare the result. However, the documentation specifically says anything relying on old features should be rewritten.
My quesion is, is there a solution to this that doesn't rely on deprecated features?
| 0 |
5,153,718 |
03/01/2011 11:13:29
| 482,682 |
10/21/2010 07:40:53
| 4 | 0 |
what is gora and it's features?
|
what is gora? what does it do for us? how it work with hbase? which features dose it have?
do you know a good essay or web page which can help me?
|
java
|
hbase
| null | null | null |
03/01/2011 15:13:00
|
not a real question
|
what is gora and it's features?
===
what is gora? what does it do for us? how it work with hbase? which features dose it have?
do you know a good essay or web page which can help me?
| 1 |
8,001,942 |
11/03/2011 21:14:46
| 507,120 |
11/14/2010 02:21:03
| 171 | 8 |
Timesheet MySQL query
|
I have a working timecard in `MySQL`, but I have no way of talleying times using `VIEW`s or `FUNCTION`s. I'd like to use a `MySQL` function call such as `getTodaysHours (user CHAR(45))` to return the user's hours for the day (including hours since punch in). Problem is I don't know how to perform the math inside of a FUNCTION.
Here is my table:
![Time Sheet][1]
And here is my "in trouble" procedure:
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getTodaysHours`(OUT hours INT, IN user CHAR(45))
BEGIN
SELECT SUM(timestamp) FROM info
WHERE DATE( FROM_UNIXTIME(timestamp-25200) )=CURDATE() AND
fullname=user
ORDER BY timestamp ASC;
END
Obviously `SUM()` is not what I want to use, but I wanted the rest to work.
[1]: http://i.stack.imgur.com/vcigH.jpg
|
php
|
mysql
|
database-design
| null | null | null |
open
|
Timesheet MySQL query
===
I have a working timecard in `MySQL`, but I have no way of talleying times using `VIEW`s or `FUNCTION`s. I'd like to use a `MySQL` function call such as `getTodaysHours (user CHAR(45))` to return the user's hours for the day (including hours since punch in). Problem is I don't know how to perform the math inside of a FUNCTION.
Here is my table:
![Time Sheet][1]
And here is my "in trouble" procedure:
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getTodaysHours`(OUT hours INT, IN user CHAR(45))
BEGIN
SELECT SUM(timestamp) FROM info
WHERE DATE( FROM_UNIXTIME(timestamp-25200) )=CURDATE() AND
fullname=user
ORDER BY timestamp ASC;
END
Obviously `SUM()` is not what I want to use, but I wanted the rest to work.
[1]: http://i.stack.imgur.com/vcigH.jpg
| 0 |
8,947,109 |
01/20/2012 19:54:14
| 539,076 |
12/11/2010 18:54:52
| 303 | 18 |
How to see GDI objects in performance monitor
|
What performance counter should be selected in perfmon in order to see GDI objects , like in task manager ?
|
performance
|
counters
| null | null | null | null |
open
|
How to see GDI objects in performance monitor
===
What performance counter should be selected in perfmon in order to see GDI objects , like in task manager ?
| 0 |
7,818,233 |
10/19/2011 08:01:23
| 494,501 |
11/02/2010 08:45:43
| 1,046 | 103 |
Many Apache processes spawning very fast, up to limit in under 3 minutes
|
we're hosting a large commercial application using apache and tomcat, knitted together by mod_jk. Today, the application stopped responding (our nagios complained), so I took a look. What I found was an insane number of apache processes in memory:
8275 ? S 0:00 /usr/sbin/apache2 -k start
8280 ? S 0:00 /usr/sbin/apache2 -k start
8285 ? S 0:00 /usr/sbin/apache2 -k start
8286 ? S 0:00 /usr/sbin/apache2 -k start
8287 ? S 0:00 /usr/sbin/apache2 -k start
Only many, many more. So, I restarted the apache in the hopes it would clean itself up. It worked for a bit, then showed the large number of processes again. I used
while x=0; do ps ax|grep apache2|wc -l; sleep 2; done
to monitor the processes, and it took about 3 minutes to get up to the maximum number of processes, where then the apache error log says
[Wed Oct 19 09:43:01 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Wed Oct 19 09:50:43 2011] [notice] caught SIGTERM, shutting down
[Wed Oct 19 09:50:43 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Wed Oct 19 09:50:44 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Wed Oct 19 09:50:44 2011] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Wed Oct 19 09:50:44 2011] [notice] mod_python: using mutex_directory /tmp
[Wed Oct 19 09:50:44 2011] [notice] Apache/2.2.14 (Debian) mod_jk/1.2.28 PHP/5.2.11-1 with Suhosin-Patch mod_python/3.3.1 Python/2.5.4 mod_ssl/2.2.14 OpenSSL/0.9.8o mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Wed Oct 19 09:52:53 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
So, after googling around for a bit I found that the number 256 for the MaxClient settings ought to be enough for anybody. So we have another problem. The only other log apache is writing is the other_vhosts_access.log, and it looks like this:
www.firstdomain.com:80 157.55.16.55 - - [19/Oct/2011:09:40:59 +0200] "GET /sortiments2.jsp?catalog_id=0&category_id=10376104&codesk=632983007112&codesk=632983005866&codesk=632983005880&codesk=632983005248 HTTP/1.1" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 91.36.177.136 - - [19/Oct/2011:09:41:21 +0200] "GET / HTTP/1.1" 503 548 "http://www.office1837.de/?gclid=CMjy7rqf9KsCFUi_zAodq1e0sQ" "Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
www.firstdomain.com:80 195.68.198.11 - - [19/Oct/2011:09:40:18 +0200] "GET /article.jsp?article_id=111083460 HTTP/1.1" 502 522 "http://www.3m-buerosortiment.de/index2.php?option=com_virtuemart&page=shop.CC.php&ean=3134375221399&prodname=Post-it\xc2\xae Notes 654NGR&sku=654NGR" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; BTRS6329; .NET CLR 2.0.50727)"
www.firstdomain.com:80 157.55.16.55 - - [19/Oct/2011:09:40:59 +0200] "GET /sortiments.jsp?catalog_id=0&category_id=11826686 HTTP/1.0" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 65.52.104.90 - - [19/Oct/2011:09:41:52 +0200] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.199.45 - - [19/Oct/2011:09:41:29 +0200] "GET /sortiments2.jsp?&category_id=9958253&catalog_id=0&codesk=4977766659659&codesk=4977766609449&codesk=4977766611091&codesk=4977766643900&codesk=4977766648523&imagesize=1&image_id=20997873 HTTP/1.1" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:41:29 +0200] "GET /supplierSortiments2.jsp?category_id=10996252&supplier=Brother&codesk=4977766643870&codesk=4977766659567&codesk=4977766659871&codesk=4977766643900 HTTP/1.0" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:41:29 +0200] "GET /sortiments2.jsp?catalog_id=127&category_id=10996604&codesk=8808979282463&codesk=8808987560621&codesk=8808987560621&codesk=8808993448104 HTTP/1.1" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 87.173.152.50 - - [19/Oct/2011:09:41:29 +0200] "GET / HTTP/1.0" 503 542 "http://www.staehlin.de/home.php/main/index/buerowelt/buerobedarf" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
www.firstdomain.com:80 79.239.149.63 - - [19/Oct/2011:09:41:29 +0200] "GET / HTTP/1.1" 503 0 "http://www.streit.de/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
www.seconddomain.com:80 82.192.74.11 - - [19/Oct/2011:09:40:28 +0200] "GET /sortiments2.jsp?add_temp_article=true&article_domain=&article_id=315001460 HTTP/1.0" 502 484 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.seconddomain.com:80 67.195.111.35 - - [19/Oct/2011:09:41:34 +0200] "GET /sortiments2.jsp?add_temp_article=true&article_domain=&article_id=111217102 HTTP/1.0" 503 541 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
www.firstdomain.com:80 213.164.69.193 - - [19/Oct/2011:09:41:34 +0200] "GET / HTTP/1.1" 503 542 "http://www.resin.de/de/onlineshops.php" "Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
www.firstdomain.com:80 217.91.140.166 - - [19/Oct/2011:09:41:13 +0200] "GET /feed/offers.jsp?type=rss_2.0 HTTP/1.1" 200 968 "-" "Apple-PubSub/28"
www.seconddomain.com:80 82.192.74.5 - - [19/Oct/2011:09:47:53 +0200] "GET /article.jsp?article_id=124009100&category_id=12758254&catalog_id=154 HTTP/1.0" 500 1866 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.firstdomain.com:80 82.192.74.5 - - [19/Oct/2011:09:41:55 +0200] "GET /redirector.jsp?&catalog_id=10&category_id=12752165 HTTP/1.0" 302 294 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.firstdomain.com:80 87.139.37.126 - - [19/Oct/2011:09:40:32 +0200] "GET / HTTP/1.1" 503 543 "http://www.bueroschaal.de/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)"
www.seconddomain.com:80 79.234.14.178 - - [19/Oct/2011:09:41:35 +0200] "GET /searchresult.jsp?position=90&searchstring=tacker HTTP/1.1" 503 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:40:33 +0200] "GET /robots.txt HTTP/1.1" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 88.130.168.74 - - [19/Oct/2011:09:41:43 +0200] "GET / HTTP/1.1" 503 540 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; de-de) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/4.1.3 Safari/533.19.4"
www.firstdomain.com:80 195.68.198.10 - - [19/Oct/2011:09:40:43 +0200] "GET /article.jsp?article_id=940126050 HTTP/1.1" 503 547 "http://www.3m-buerosortiment.de/index2.php?option=com_virtuemart&page=shop.CC.php&ean=3134375221399&prodname=Post-it\xc2\xae Notes 654NGR&sku=654NGR" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; BTRS6329; .NET CLR 2.0.50727)"
www.seconddomain.com:80 87.139.126.238 - - [19/Oct/2011:09:42:40 +0200] "POST /searchresult.jsp;jsessionid=CCA8181DB579814B8F317CCE61F9FC16 HTTP/1.1" 302 399 "http://salfer.firstdomain.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)"
www.firstdomain.com:80 67.195.114.43 - - [19/Oct/2011:09:48:03 +0200] "GET /robots.txt HTTP/1.0" 200 423 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
www.firstdomain.com:80 217.91.140.166 - - [19/Oct/2011:09:41:34 +0200] "GET /shoppingcart.jsp HTTP/1.1" 200 6328 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
www.firstdomain.com:80 207.46.199.203 - - [19/Oct/2011:09:42:59 +0200] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 83.64.224.10 - - [19/Oct/2011:09:40:46 +0200] "GET /article.jsp?&searchstring=hp+17&article_id=101231800&imagesize=2&image_id=8301473 HTTP/1.1" 503 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB7.1; .NET CLR 1.1.4322)"
www.seconddomain.com:80 188.195.58.227 - - [19/Oct/2011:09:40:31 +0200] "GET / HTTP/1.1" 502 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:40:32 +0200] "GET /article.jsp?article_id=5006056&category_id=10549957&catalog_id=148 HTTP/1.0" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 84.138.10.184 - - [19/Oct/2011:09:41:57 +0200] "GET /index.jsp HTTP/1.1" 503 630 "-" "Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0"
That's pretty usual traffic. So, from this point on, I don't know how to determine what the problem is. It would help if I could somehow see/determine:
- why apache spawns these new processes and
- which requests start a new process.
I have a netstat ready, if needed, but it only shows the normal connections, like I would expect.
|
apache
|
tomcat
|
mod-jk
| null | null | null |
open
|
Many Apache processes spawning very fast, up to limit in under 3 minutes
===
we're hosting a large commercial application using apache and tomcat, knitted together by mod_jk. Today, the application stopped responding (our nagios complained), so I took a look. What I found was an insane number of apache processes in memory:
8275 ? S 0:00 /usr/sbin/apache2 -k start
8280 ? S 0:00 /usr/sbin/apache2 -k start
8285 ? S 0:00 /usr/sbin/apache2 -k start
8286 ? S 0:00 /usr/sbin/apache2 -k start
8287 ? S 0:00 /usr/sbin/apache2 -k start
Only many, many more. So, I restarted the apache in the hopes it would clean itself up. It worked for a bit, then showed the large number of processes again. I used
while x=0; do ps ax|grep apache2|wc -l; sleep 2; done
to monitor the processes, and it took about 3 minutes to get up to the maximum number of processes, where then the apache error log says
[Wed Oct 19 09:43:01 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Wed Oct 19 09:50:43 2011] [notice] caught SIGTERM, shutting down
[Wed Oct 19 09:50:43 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Wed Oct 19 09:50:44 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Wed Oct 19 09:50:44 2011] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Wed Oct 19 09:50:44 2011] [notice] mod_python: using mutex_directory /tmp
[Wed Oct 19 09:50:44 2011] [notice] Apache/2.2.14 (Debian) mod_jk/1.2.28 PHP/5.2.11-1 with Suhosin-Patch mod_python/3.3.1 Python/2.5.4 mod_ssl/2.2.14 OpenSSL/0.9.8o mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Wed Oct 19 09:52:53 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
So, after googling around for a bit I found that the number 256 for the MaxClient settings ought to be enough for anybody. So we have another problem. The only other log apache is writing is the other_vhosts_access.log, and it looks like this:
www.firstdomain.com:80 157.55.16.55 - - [19/Oct/2011:09:40:59 +0200] "GET /sortiments2.jsp?catalog_id=0&category_id=10376104&codesk=632983007112&codesk=632983005866&codesk=632983005880&codesk=632983005248 HTTP/1.1" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 91.36.177.136 - - [19/Oct/2011:09:41:21 +0200] "GET / HTTP/1.1" 503 548 "http://www.office1837.de/?gclid=CMjy7rqf9KsCFUi_zAodq1e0sQ" "Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
www.firstdomain.com:80 195.68.198.11 - - [19/Oct/2011:09:40:18 +0200] "GET /article.jsp?article_id=111083460 HTTP/1.1" 502 522 "http://www.3m-buerosortiment.de/index2.php?option=com_virtuemart&page=shop.CC.php&ean=3134375221399&prodname=Post-it\xc2\xae Notes 654NGR&sku=654NGR" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; BTRS6329; .NET CLR 2.0.50727)"
www.firstdomain.com:80 157.55.16.55 - - [19/Oct/2011:09:40:59 +0200] "GET /sortiments.jsp?catalog_id=0&category_id=11826686 HTTP/1.0" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 65.52.104.90 - - [19/Oct/2011:09:41:52 +0200] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.199.45 - - [19/Oct/2011:09:41:29 +0200] "GET /sortiments2.jsp?&category_id=9958253&catalog_id=0&codesk=4977766659659&codesk=4977766609449&codesk=4977766611091&codesk=4977766643900&codesk=4977766648523&imagesize=1&image_id=20997873 HTTP/1.1" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:41:29 +0200] "GET /supplierSortiments2.jsp?category_id=10996252&supplier=Brother&codesk=4977766643870&codesk=4977766659567&codesk=4977766659871&codesk=4977766643900 HTTP/1.0" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:41:29 +0200] "GET /sortiments2.jsp?catalog_id=127&category_id=10996604&codesk=8808979282463&codesk=8808987560621&codesk=8808987560621&codesk=8808993448104 HTTP/1.1" 503 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 87.173.152.50 - - [19/Oct/2011:09:41:29 +0200] "GET / HTTP/1.0" 503 542 "http://www.staehlin.de/home.php/main/index/buerowelt/buerobedarf" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
www.firstdomain.com:80 79.239.149.63 - - [19/Oct/2011:09:41:29 +0200] "GET / HTTP/1.1" 503 0 "http://www.streit.de/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
www.seconddomain.com:80 82.192.74.11 - - [19/Oct/2011:09:40:28 +0200] "GET /sortiments2.jsp?add_temp_article=true&article_domain=&article_id=315001460 HTTP/1.0" 502 484 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.seconddomain.com:80 67.195.111.35 - - [19/Oct/2011:09:41:34 +0200] "GET /sortiments2.jsp?add_temp_article=true&article_domain=&article_id=111217102 HTTP/1.0" 503 541 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
www.firstdomain.com:80 213.164.69.193 - - [19/Oct/2011:09:41:34 +0200] "GET / HTTP/1.1" 503 542 "http://www.resin.de/de/onlineshops.php" "Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
www.firstdomain.com:80 217.91.140.166 - - [19/Oct/2011:09:41:13 +0200] "GET /feed/offers.jsp?type=rss_2.0 HTTP/1.1" 200 968 "-" "Apple-PubSub/28"
www.seconddomain.com:80 82.192.74.5 - - [19/Oct/2011:09:47:53 +0200] "GET /article.jsp?article_id=124009100&category_id=12758254&catalog_id=154 HTTP/1.0" 500 1866 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.firstdomain.com:80 82.192.74.5 - - [19/Oct/2011:09:41:55 +0200] "GET /redirector.jsp?&catalog_id=10&category_id=12752165 HTTP/1.0" 302 294 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
www.firstdomain.com:80 87.139.37.126 - - [19/Oct/2011:09:40:32 +0200] "GET / HTTP/1.1" 503 543 "http://www.bueroschaal.de/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)"
www.seconddomain.com:80 79.234.14.178 - - [19/Oct/2011:09:41:35 +0200] "GET /searchresult.jsp?position=90&searchstring=tacker HTTP/1.1" 503 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:40:33 +0200] "GET /robots.txt HTTP/1.1" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 88.130.168.74 - - [19/Oct/2011:09:41:43 +0200] "GET / HTTP/1.1" 503 540 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; de-de) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/4.1.3 Safari/533.19.4"
www.firstdomain.com:80 195.68.198.10 - - [19/Oct/2011:09:40:43 +0200] "GET /article.jsp?article_id=940126050 HTTP/1.1" 503 547 "http://www.3m-buerosortiment.de/index2.php?option=com_virtuemart&page=shop.CC.php&ean=3134375221399&prodname=Post-it\xc2\xae Notes 654NGR&sku=654NGR" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; BTRS6329; .NET CLR 2.0.50727)"
www.seconddomain.com:80 87.139.126.238 - - [19/Oct/2011:09:42:40 +0200] "POST /searchresult.jsp;jsessionid=CCA8181DB579814B8F317CCE61F9FC16 HTTP/1.1" 302 399 "http://salfer.firstdomain.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)"
www.firstdomain.com:80 67.195.114.43 - - [19/Oct/2011:09:48:03 +0200] "GET /robots.txt HTTP/1.0" 200 423 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"
www.firstdomain.com:80 217.91.140.166 - - [19/Oct/2011:09:41:34 +0200] "GET /shoppingcart.jsp HTTP/1.1" 200 6328 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
www.firstdomain.com:80 207.46.199.203 - - [19/Oct/2011:09:42:59 +0200] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 83.64.224.10 - - [19/Oct/2011:09:40:46 +0200] "GET /article.jsp?&searchstring=hp+17&article_id=101231800&imagesize=2&image_id=8301473 HTTP/1.1" 503 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB7.1; .NET CLR 1.1.4322)"
www.seconddomain.com:80 188.195.58.227 - - [19/Oct/2011:09:40:31 +0200] "GET / HTTP/1.1" 502 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C)"
www.firstdomain.com:80 207.46.12.238 - - [19/Oct/2011:09:40:32 +0200] "GET /article.jsp?article_id=5006056&category_id=10549957&catalog_id=148 HTTP/1.0" 502 0 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
www.seconddomain.com:80 84.138.10.184 - - [19/Oct/2011:09:41:57 +0200] "GET /index.jsp HTTP/1.1" 503 630 "-" "Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0"
That's pretty usual traffic. So, from this point on, I don't know how to determine what the problem is. It would help if I could somehow see/determine:
- why apache spawns these new processes and
- which requests start a new process.
I have a netstat ready, if needed, but it only shows the normal connections, like I would expect.
| 0 |
5,313,005 |
03/15/2011 14:12:13
| 585,213 |
01/21/2011 23:51:56
| 19 | 1 |
wp_generate_password returns password but can't login using it
|
Im creating a simple login/registration page incorporating user moderation and bootstrapping wp for the heavy lifting.
I can get the new user added to the db and a password gets created and hashed and all, but when i go to login w/ that account the password won't work. i'm stumped...
Anyone see anything i'm missing?
require_once( ABSPATH . WPINC . '/registration.php' );
$user_pass = wp_generate_password();
$userdata = array(
'user_pass' => $user_pass,
'user_login' => esc_attr( $_POST['user_email'] ),
'user_email' => esc_attr( $_POST['user_email'] ),
);
if( !$userdata['user_login'] )
$error .= __('An Email Address is required for registration.', 'frontendprofile');
elseif ( username_exists( $userdata['user_login'] ) )
$error .= __('Sorry, that Email Address is already in use for another account.', 'frontendprofile');
elseif ( !is_email( $userdata['user_email'] ) )
$error .= __('You must enter a valid Email Address.', 'frontendprofile');
elseif ( email_exists( $userdata['user_email'] ) )
$error .= __('Sorry, that Email Address is already for another account.', 'frontendprofile');
else{
$new_user = wp_update_user( $userdata );
}
|
wordpress
|
wordpress-login
| null | null | null | null |
open
|
wp_generate_password returns password but can't login using it
===
Im creating a simple login/registration page incorporating user moderation and bootstrapping wp for the heavy lifting.
I can get the new user added to the db and a password gets created and hashed and all, but when i go to login w/ that account the password won't work. i'm stumped...
Anyone see anything i'm missing?
require_once( ABSPATH . WPINC . '/registration.php' );
$user_pass = wp_generate_password();
$userdata = array(
'user_pass' => $user_pass,
'user_login' => esc_attr( $_POST['user_email'] ),
'user_email' => esc_attr( $_POST['user_email'] ),
);
if( !$userdata['user_login'] )
$error .= __('An Email Address is required for registration.', 'frontendprofile');
elseif ( username_exists( $userdata['user_login'] ) )
$error .= __('Sorry, that Email Address is already in use for another account.', 'frontendprofile');
elseif ( !is_email( $userdata['user_email'] ) )
$error .= __('You must enter a valid Email Address.', 'frontendprofile');
elseif ( email_exists( $userdata['user_email'] ) )
$error .= __('Sorry, that Email Address is already for another account.', 'frontendprofile');
else{
$new_user = wp_update_user( $userdata );
}
| 0 |
11,523,110 |
07/17/2012 13:04:48
| 967,977 |
09/27/2011 21:49:29
| 27 | 0 |
Need to connect to unix and run remote perl script -- using vb.net and SSH
|
What would be the easiest way to do this where there isn't any commerical products involved. I currently have my code setup like this and it isn't working out. At the moment UNIXCOMPUTERNAME and UNIXPASSWORD is hardcoded into the program just for my personal testing purposes.
This is for a asp.net web page and this is located in the codebehind file. I either want to get this code to work or I want to find a SSH library. I am using Visual Studio Web Developer Express, so it seems that is also limiting me.
Dim unixVariables(2) As String
nameLabel.Text = FQDN.Text
Dim Proc As New System.Diagnostics.Process
Proc.StartInfo = New ProcessStartInfo("C:\plink.exe")
Proc.StartInfo.Arguments = "-pw " & UNIXPASSWORD & " " & UNIXUSERNAME & "@" & UNIXCOMPUTERNAME & " ls > output.txt"
Proc.StartInfo.RedirectStandardInput = True
Proc.StartInfo.RedirectStandardOutput = True
Proc.StartInfo.UseShellExecute = False
Proc.Start()
' Pause for script to run
System.Threading.Thread.Sleep(100)
Proc.Close()
|
asp.net
|
vb.net
|
ssh
| null | null | null |
open
|
Need to connect to unix and run remote perl script -- using vb.net and SSH
===
What would be the easiest way to do this where there isn't any commerical products involved. I currently have my code setup like this and it isn't working out. At the moment UNIXCOMPUTERNAME and UNIXPASSWORD is hardcoded into the program just for my personal testing purposes.
This is for a asp.net web page and this is located in the codebehind file. I either want to get this code to work or I want to find a SSH library. I am using Visual Studio Web Developer Express, so it seems that is also limiting me.
Dim unixVariables(2) As String
nameLabel.Text = FQDN.Text
Dim Proc As New System.Diagnostics.Process
Proc.StartInfo = New ProcessStartInfo("C:\plink.exe")
Proc.StartInfo.Arguments = "-pw " & UNIXPASSWORD & " " & UNIXUSERNAME & "@" & UNIXCOMPUTERNAME & " ls > output.txt"
Proc.StartInfo.RedirectStandardInput = True
Proc.StartInfo.RedirectStandardOutput = True
Proc.StartInfo.UseShellExecute = False
Proc.Start()
' Pause for script to run
System.Threading.Thread.Sleep(100)
Proc.Close()
| 0 |
7,443,056 |
09/16/2011 10:02:36
| 270,315 |
02/10/2010 13:45:24
| 703 | 18 |
ASP.NET MVC3 and IIS6 - wildcard application maps drawbacks and alternatives?
|
I'm using ASP.NET MVC3 and IIS6. Without wildcard application mapping my application works fine, despite one issue. When I try request for *.js file, ex: http://www.my.app.com/res/script.js, such request is not processed by MVC application. The file is served directly by IIS (which searches virtual directory for such file). It is not desired for me, because I need custom processing of some *.js files (I need to redirect the requests for them to different locations, so I've written controller for that). For such requests to be maintained by my MVC application, I've added wildcard application map in IIS settings. Now requests for *.js files are processed by MVC and passed through my controller.
![enter image description here][1]
It seems to be ok, but what are the threats of such approach ? Are there any major performance issues ? Can this all be done in some better way ? Mabye without IIS configuration (just web.confing changes) ?
Regards
[1]: http://i.stack.imgur.com/OKtkT.jpg
|
asp.net-mvc-3
|
iis6
|
wildcard-mapping
| null | null | null |
open
|
ASP.NET MVC3 and IIS6 - wildcard application maps drawbacks and alternatives?
===
I'm using ASP.NET MVC3 and IIS6. Without wildcard application mapping my application works fine, despite one issue. When I try request for *.js file, ex: http://www.my.app.com/res/script.js, such request is not processed by MVC application. The file is served directly by IIS (which searches virtual directory for such file). It is not desired for me, because I need custom processing of some *.js files (I need to redirect the requests for them to different locations, so I've written controller for that). For such requests to be maintained by my MVC application, I've added wildcard application map in IIS settings. Now requests for *.js files are processed by MVC and passed through my controller.
![enter image description here][1]
It seems to be ok, but what are the threats of such approach ? Are there any major performance issues ? Can this all be done in some better way ? Mabye without IIS configuration (just web.confing changes) ?
Regards
[1]: http://i.stack.imgur.com/OKtkT.jpg
| 0 |
7,867,929 |
10/23/2011 17:43:45
| 1,009,761 |
10/23/2011 17:21:09
| 1 | 0 |
What would be best way to hide a trace?
|
I'm building script for scraping data from several business directories.
This should net be an issue, because scraped data will not be used for spamming or any unethical method, but still I would like to not leave traces (I know that there is no 100% secured way to hide a trace)..
Anyway, here are my options:
- **Using free proxies***
While this works, most of the proxies gets down very quickly
- **Tor**
I can route all traffic through Tor network, but it's dead slow
- **Something else**
What do you think about paid proxy servers? Any other suggestion? Maybe VPN?
My script ll be located at the public domain
|
parsing
|
proxy
|
screen-scraping
|
vpn
|
tor
|
10/24/2011 02:17:23
|
not constructive
|
What would be best way to hide a trace?
===
I'm building script for scraping data from several business directories.
This should net be an issue, because scraped data will not be used for spamming or any unethical method, but still I would like to not leave traces (I know that there is no 100% secured way to hide a trace)..
Anyway, here are my options:
- **Using free proxies***
While this works, most of the proxies gets down very quickly
- **Tor**
I can route all traffic through Tor network, but it's dead slow
- **Something else**
What do you think about paid proxy servers? Any other suggestion? Maybe VPN?
My script ll be located at the public domain
| 4 |
1,726,183 |
11/12/2009 23:38:38
| 172,279 |
09/11/2009 21:24:40
| 399 | 31 |
jQuery passing a function call through to another function and order of execution
|
I have this javascript:
triggerAnimation(listItem,toggleToggleRadioListItem(listItem));
function triggerAnimation(listItem,passThruFunction){
listItem.find(".inlineLoading").show();
// pause and then call the toggle function
$("body").animate({opacity: 1}, 1000,
function(){
alert("a");
passThruFunction;
}
);
}
function toggleToggleRadioListItem(listItem) {
alert("b");
};
What is supposed to happen:
- triggerAnimation is called passing an object and a function
- triggerAnimation does a dummy animation (to create a pause) then raises an alert and triggers a callback function which executes the function that was passed through.
- the function that was passed through is called raising an alert.
Based on the above, I'd expect the alert A to appear before alert B but that is not the case. What happens is that (it seems) alert B is called as soon as triggerAnimation() is called. Why is that? How can I achieve that behavior?
|
jquery
|
delayed-execution
| null | null | null | null |
open
|
jQuery passing a function call through to another function and order of execution
===
I have this javascript:
triggerAnimation(listItem,toggleToggleRadioListItem(listItem));
function triggerAnimation(listItem,passThruFunction){
listItem.find(".inlineLoading").show();
// pause and then call the toggle function
$("body").animate({opacity: 1}, 1000,
function(){
alert("a");
passThruFunction;
}
);
}
function toggleToggleRadioListItem(listItem) {
alert("b");
};
What is supposed to happen:
- triggerAnimation is called passing an object and a function
- triggerAnimation does a dummy animation (to create a pause) then raises an alert and triggers a callback function which executes the function that was passed through.
- the function that was passed through is called raising an alert.
Based on the above, I'd expect the alert A to appear before alert B but that is not the case. What happens is that (it seems) alert B is called as soon as triggerAnimation() is called. Why is that? How can I achieve that behavior?
| 0 |
11,508,480 |
07/16/2012 16:25:31
| 1,203,556 |
02/11/2012 09:06:27
| 531 | 3 |
How to I get my local repo in sync wit ha file in master repo on github?
|
I am looking a file in master on git hub.
I am looking at the same file on my local repo but it is not reflect changes in the master file on the repo committed by someone else.
I tried git pull
git fetch and merge.
What else to I have to do?
|
git
|
github
| null | null | null | null |
open
|
How to I get my local repo in sync wit ha file in master repo on github?
===
I am looking a file in master on git hub.
I am looking at the same file on my local repo but it is not reflect changes in the master file on the repo committed by someone else.
I tried git pull
git fetch and merge.
What else to I have to do?
| 0 |
8,231,362 |
11/22/2011 17:53:24
| 541,318 |
12/14/2010 01:08:40
| 1 | 0 |
What is correct method to execute curl from a subprocess?
|
I was trying to invoke curl from subprocess to download images, but kept getting curl error (error code 2 ..which from doc refers to CURL_FAILED_INIT). I am not using urllib as i will eventually be executing a script using subprocess. Following is the code snippet
import subprocess
import multiprocessing
def worker(fname, k):
f = open(fname, 'r')
i = 0
for imgurl in f:
try:
op = subprocess.call(['curl', '-O', imgurl], shell=False)
except:
print 'problem downloading image - ', imgurl
def main():
flist = []
flist.append(sys.argv[1])
flist.append(sys.argv[2])
...
for k in range(1):
p = multiprocessing.Process(target=worker, args=(flist[k],k))
p.start()
O/P:
----
curl: try 'curl --help' or 'curl --manual' for more information
2
curl: try 'curl --help' or 'curl --manual' for more information
2
....
|
python
|
curl
|
subprocess
| null | null | null |
open
|
What is correct method to execute curl from a subprocess?
===
I was trying to invoke curl from subprocess to download images, but kept getting curl error (error code 2 ..which from doc refers to CURL_FAILED_INIT). I am not using urllib as i will eventually be executing a script using subprocess. Following is the code snippet
import subprocess
import multiprocessing
def worker(fname, k):
f = open(fname, 'r')
i = 0
for imgurl in f:
try:
op = subprocess.call(['curl', '-O', imgurl], shell=False)
except:
print 'problem downloading image - ', imgurl
def main():
flist = []
flist.append(sys.argv[1])
flist.append(sys.argv[2])
...
for k in range(1):
p = multiprocessing.Process(target=worker, args=(flist[k],k))
p.start()
O/P:
----
curl: try 'curl --help' or 'curl --manual' for more information
2
curl: try 'curl --help' or 'curl --manual' for more information
2
....
| 0 |
5,591,756 |
04/08/2011 07:17:23
| 698,114 |
04/08/2011 06:40:52
| 1 | 0 |
Open source+free+webbased pdf viewer
|
I am looking for a pdf viewer which must have the following features
1)Open source
2)Free
3)Web Based
4)Php/mysql web-application supportive.
6)caching facility
I have already seen flexpaper,do-pdf,sumatra pdf and many others but those doesn't fullfill my
above criteria
|
php
| null | null | null | null | null |
open
|
Open source+free+webbased pdf viewer
===
I am looking for a pdf viewer which must have the following features
1)Open source
2)Free
3)Web Based
4)Php/mysql web-application supportive.
6)caching facility
I have already seen flexpaper,do-pdf,sumatra pdf and many others but those doesn't fullfill my
above criteria
| 0 |
11,719,454 |
07/30/2012 10:16:10
| 988,445 |
10/10/2011 21:32:09
| 3,091 | 41 |
Unable to click checkboxes in string grid
|
I am placing check boxes (`TCheckBox`) in a string grid (`TStringGrid`) in the first column (0). The checkboxes show fine, positioned correctly, and even respond to the mouse by glowing when hovering over them. When I click them, however, they do not toggle. They react to the click, and highlight, but finally, the actual `Checked` property does not change. What makes it more puzzling is I don't have any code changing these values once they're there, nor do I even have an `OnClick` event assigned to these checkboxes. Also, I'm defaulting these checkboxes to be *unchecked*, but when displayed, they are *checked*.
The checkboxes are created along with each record which is added to the list, and is referenced inside a record pointer which is assigned to the object in the cell where the checkbox is to be placed.
String grid hack for cell highlighting:
type
THackStringGrid = class(TStringGrid); //used later...
Record containing checkbox:
PImageLink = ^TImageLink;
TImageLink = record
...other stuff...
Checkbox: TCheckbox;
ShowCheckbox: Bool;
end;
Creation/Destruction of checkbox:
function NewImageLink(const AFilename: String): PImageLink;
begin
Result:= New(PImageLink);
...other stuff...
Result.Checkbox:= TCheckbox.Create(nil);
Result.Checkbox.Caption:= '';
end;
procedure DestroyImageLink(AImageLink: PImageLink);
begin
AImageLink.Checkbox.Free;
Dispose(AImageLink);
end;
Adding rows to list:
//...after clearing list...
//L = TStringList of original filenames
if L.Count > 0 then
lstFiles.RowCount:= L.Count + 1
else
lstFiles.RowCount:= 2; //in case there are no records
for X := 0 to L.Count - 1 do begin
S:= L[X];
Link:= NewImageLink(S); //also creates checkbox
Link.Checkbox.Parent:= lstFiles;
Link.Checkbox.Visible:= Link.ShowCheckbox;
Link.Checkbox.Checked:= False;
Link.Checkbox.BringToFront;
lstFiles.Objects[0,X+1]:= Pointer(Link);
lstFiles.Cells[1, X+1]:= S;
end;
Grid's OnDrawCell Event Handler:
procedure TfrmMain.lstFilesDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
Link: PImageLink;
CR: TRect;
begin
if (ARow > 0) and (ACol = 0) then begin
Link:= PImageLink(lstFiles.Objects[0,ARow]); //Get record pointer
CR:= lstFiles.CellRect(0, ARow); //Get cell rect
Link.Checkbox.Width:= Link.Checkbox.Height;
Link.Checkbox.Left:= CR.Left + (CR.Width div 2) - (Link.Checkbox.Width div 2);
Link.Checkbox.Top:= CR.Top;
if not Link.Checkbox.Visible then begin
lstFiles.Canvas.Brush.Color:= lstFiles.Color;
lstFiles.Canvas.Brush.Style:= bsSolid;
lstFiles.Canvas.Pen.Style:= psClear;
lstFiles.Canvas.FillRect(CR);
if lstFiles.Row = ARow then
THackStringGrid(lstFiles).DrawCellHighlight(CR, State, ACol, ARow);
end;
end;
end;
Here's how it looks when clicking...
![Reacts to Mouse Click but Doesn't Change][1]
What could be causing this? It's definitely not changing the `Checked` property anywhere in my code. There must be some strange behavior coming from the checkboxes themselves when placed in a grid.
**EDIT**
I did a brief test, I placed a regular `TCheckBox` on the form. Check/unchecks fine. Then, in my form's `OnShow` event, I changed the Checkbox's `Parent` to this grid. This time, it reacts the same, not changing when clicked. Therefore, it seems that a `TCheckBox` doesn't react properly when it has another control as its parent. How to overcome this?
[1]: http://i.stack.imgur.com/zMgyk.png
|
delphi
|
checkbox
|
mouseevent
|
delphi-xe2
|
tstringgrid
| null |
open
|
Unable to click checkboxes in string grid
===
I am placing check boxes (`TCheckBox`) in a string grid (`TStringGrid`) in the first column (0). The checkboxes show fine, positioned correctly, and even respond to the mouse by glowing when hovering over them. When I click them, however, they do not toggle. They react to the click, and highlight, but finally, the actual `Checked` property does not change. What makes it more puzzling is I don't have any code changing these values once they're there, nor do I even have an `OnClick` event assigned to these checkboxes. Also, I'm defaulting these checkboxes to be *unchecked*, but when displayed, they are *checked*.
The checkboxes are created along with each record which is added to the list, and is referenced inside a record pointer which is assigned to the object in the cell where the checkbox is to be placed.
String grid hack for cell highlighting:
type
THackStringGrid = class(TStringGrid); //used later...
Record containing checkbox:
PImageLink = ^TImageLink;
TImageLink = record
...other stuff...
Checkbox: TCheckbox;
ShowCheckbox: Bool;
end;
Creation/Destruction of checkbox:
function NewImageLink(const AFilename: String): PImageLink;
begin
Result:= New(PImageLink);
...other stuff...
Result.Checkbox:= TCheckbox.Create(nil);
Result.Checkbox.Caption:= '';
end;
procedure DestroyImageLink(AImageLink: PImageLink);
begin
AImageLink.Checkbox.Free;
Dispose(AImageLink);
end;
Adding rows to list:
//...after clearing list...
//L = TStringList of original filenames
if L.Count > 0 then
lstFiles.RowCount:= L.Count + 1
else
lstFiles.RowCount:= 2; //in case there are no records
for X := 0 to L.Count - 1 do begin
S:= L[X];
Link:= NewImageLink(S); //also creates checkbox
Link.Checkbox.Parent:= lstFiles;
Link.Checkbox.Visible:= Link.ShowCheckbox;
Link.Checkbox.Checked:= False;
Link.Checkbox.BringToFront;
lstFiles.Objects[0,X+1]:= Pointer(Link);
lstFiles.Cells[1, X+1]:= S;
end;
Grid's OnDrawCell Event Handler:
procedure TfrmMain.lstFilesDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
Link: PImageLink;
CR: TRect;
begin
if (ARow > 0) and (ACol = 0) then begin
Link:= PImageLink(lstFiles.Objects[0,ARow]); //Get record pointer
CR:= lstFiles.CellRect(0, ARow); //Get cell rect
Link.Checkbox.Width:= Link.Checkbox.Height;
Link.Checkbox.Left:= CR.Left + (CR.Width div 2) - (Link.Checkbox.Width div 2);
Link.Checkbox.Top:= CR.Top;
if not Link.Checkbox.Visible then begin
lstFiles.Canvas.Brush.Color:= lstFiles.Color;
lstFiles.Canvas.Brush.Style:= bsSolid;
lstFiles.Canvas.Pen.Style:= psClear;
lstFiles.Canvas.FillRect(CR);
if lstFiles.Row = ARow then
THackStringGrid(lstFiles).DrawCellHighlight(CR, State, ACol, ARow);
end;
end;
end;
Here's how it looks when clicking...
![Reacts to Mouse Click but Doesn't Change][1]
What could be causing this? It's definitely not changing the `Checked` property anywhere in my code. There must be some strange behavior coming from the checkboxes themselves when placed in a grid.
**EDIT**
I did a brief test, I placed a regular `TCheckBox` on the form. Check/unchecks fine. Then, in my form's `OnShow` event, I changed the Checkbox's `Parent` to this grid. This time, it reacts the same, not changing when clicked. Therefore, it seems that a `TCheckBox` doesn't react properly when it has another control as its parent. How to overcome this?
[1]: http://i.stack.imgur.com/zMgyk.png
| 0 |
3,453,275 |
08/10/2010 20:44:50
| 416,595 |
08/10/2010 20:35:03
| 1 | 0 |
consume soap service with ruby and savon
|
I'm trying to use ruby and Savon to consume a web service.
The test service is http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2
<pre>
require 'rubygems'
require 'savon'
client = Savon::Client.new "http://www.webservicex.net/stockquote.asmx?WSDL"
client.get_quote do |soap|
soap.body = {:symbol => "AAPL"}
end
</pre>
Which returns an SOAP exception. Inspecting the soap envelope, it looks to me that the soap request doesn't have the correct namespace(s).
Can anyone suggest what I can do to make this work?
I have the same problem with other web service endpoints as well.
Thanks,
|
ruby
|
soap
|
wsdl
| null | null | null |
open
|
consume soap service with ruby and savon
===
I'm trying to use ruby and Savon to consume a web service.
The test service is http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2
<pre>
require 'rubygems'
require 'savon'
client = Savon::Client.new "http://www.webservicex.net/stockquote.asmx?WSDL"
client.get_quote do |soap|
soap.body = {:symbol => "AAPL"}
end
</pre>
Which returns an SOAP exception. Inspecting the soap envelope, it looks to me that the soap request doesn't have the correct namespace(s).
Can anyone suggest what I can do to make this work?
I have the same problem with other web service endpoints as well.
Thanks,
| 0 |
3,904,349 |
10/11/2010 07:41:24
| 422,471 |
08/17/2010 05:48:26
| 3 | 1 |
Navigation between views
|
I have app with UITabBarController. First tab has UINavigationController and it is UITableViewController. I mean I have tabs at the bottom and in first tab I have a table with possibility to navigate to other views. After touching one of cells I call view with MKMapView
if([indexPath section] == 3){
LocationDetailViewController *dvController = [[LocationDetailViewController alloc] initWithNibName:@"LocationDetailView" bundle:[NSBundle mainBundle]];
dvController.locationGPS = self.locationGPS;
[self.navigationController pushViewController:dvController animated:YES];
LocationDetailViewController is defined like
@interface LocationDetailViewController : UIViewController <MKMapViewDelegate>
in it I have a toolbar with button with action:
- (void)myCurrentAddress:(id)sender {
AddressDetailViewController *dvController = [[AddressDetailViewController alloc] initWithNibName:@"AddressDetailView" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:dvController animated:YES]; }
AddressDetailViewController is defined like:
@interface AddressDetailViewController : UIViewController
When I try to use code:
- (void)myBackAction {
[self.navigationController popViewControllerAnimated:YES]; }
it doesn't do anything. Debugger stops on this line - and then continues with no warnings or errors - but no changes on screen. If i remove my own back button and standard back button will be generated it will navigate back NavigationBar but not the view.
Also if I navigate to AddressDetailViewController from another tableviewcontroller class then eveyrhing is ok, where you should look into to find out the problem? please help ))
|
iphone
|
cocoa-touch
|
uinavigationcontroller
| null | null | null |
open
|
Navigation between views
===
I have app with UITabBarController. First tab has UINavigationController and it is UITableViewController. I mean I have tabs at the bottom and in first tab I have a table with possibility to navigate to other views. After touching one of cells I call view with MKMapView
if([indexPath section] == 3){
LocationDetailViewController *dvController = [[LocationDetailViewController alloc] initWithNibName:@"LocationDetailView" bundle:[NSBundle mainBundle]];
dvController.locationGPS = self.locationGPS;
[self.navigationController pushViewController:dvController animated:YES];
LocationDetailViewController is defined like
@interface LocationDetailViewController : UIViewController <MKMapViewDelegate>
in it I have a toolbar with button with action:
- (void)myCurrentAddress:(id)sender {
AddressDetailViewController *dvController = [[AddressDetailViewController alloc] initWithNibName:@"AddressDetailView" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:dvController animated:YES]; }
AddressDetailViewController is defined like:
@interface AddressDetailViewController : UIViewController
When I try to use code:
- (void)myBackAction {
[self.navigationController popViewControllerAnimated:YES]; }
it doesn't do anything. Debugger stops on this line - and then continues with no warnings or errors - but no changes on screen. If i remove my own back button and standard back button will be generated it will navigate back NavigationBar but not the view.
Also if I navigate to AddressDetailViewController from another tableviewcontroller class then eveyrhing is ok, where you should look into to find out the problem? please help ))
| 0 |
8,944,505 |
01/20/2012 16:20:10
| 1,151,073 |
01/16/2012 01:15:54
| 6 | 0 |
Plesk doesn't detect multiple PHP versions
|
I have installed 2 PHP versions on my Windows Server 2008 r2
The Paths of the installation are
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5 (5.3 version)
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP52 (5.2 version)
I have register the iniPaths
HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.3 (IniFilePath: C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP53\)
HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.2.1 (IniFilePath: C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP52\)
From IIS i can use any of the version successful with no problem but from plesk if I refresh the components i get that PHP is not installed. It doesn't detect any of the installations. If i change the regedit form HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.3 to HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5 it detects the 5.3 version but his is not working on IIS any more
Do you know what i have to do?
|
php
|
windows
|
iis
|
plesk
|
regedit
|
01/20/2012 16:36:26
|
off topic
|
Plesk doesn't detect multiple PHP versions
===
I have installed 2 PHP versions on my Windows Server 2008 r2
The Paths of the installation are
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5 (5.3 version)
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP52 (5.2 version)
I have register the iniPaths
HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.3 (IniFilePath: C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP53\)
HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.2.1 (IniFilePath: C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP52\)
From IIS i can use any of the version successful with no problem but from plesk if I refresh the components i get that PHP is not installed. It doesn't detect any of the installations. If i change the regedit form HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5.3 to HKEY_LOCAL_MACHINE/SOFTWARE/wow6432node/PHP/5 it detects the 5.3 version but his is not working on IIS any more
Do you know what i have to do?
| 2 |
4,727,135 |
01/18/2011 17:33:56
| 468,506 |
08/15/2010 16:43:37
| 77 | 0 |
How to find out class name & tiled of program in c++?
|
the question is how to find out class name from running programs & title of that programs, i know that already exist some scanning tools like windowse or spy++ from visual studio, but what i asking you is how to make programs like those in our own source code, what function to use, is there some open source program that can help? Code appreciate, link's also :)
|
c++
|
windows
|
class
|
title
| null | null |
open
|
How to find out class name & tiled of program in c++?
===
the question is how to find out class name from running programs & title of that programs, i know that already exist some scanning tools like windowse or spy++ from visual studio, but what i asking you is how to make programs like those in our own source code, what function to use, is there some open source program that can help? Code appreciate, link's also :)
| 0 |
10,947,870 |
06/08/2012 11:21:52
| 1,442,204 |
06/07/2012 12:30:16
| 3 | 0 |
Understanding projectile trigonometry
|
http://www.postimg.com/72000/photo-71756.jpg
My question is demonstrated by the graphic. The aiming line is solely an example not the only solution. I'm looking for a solution that is not extreme - not a super straight line to target and not a super high shot.
I'm asking this because I have trouble understanding how it's done and what the theory is, I'd just like a concrete example.
If I didn't supply enough information please let me know, this is not a real life situation, assume virtual PC game environment.
Am I right in thinking that to solve this problem, we must know the gravity? How would we find the gravity for all possible shots without knowing anything besides the distance between two points?
|
math
|
trigonometry
| null | null | null |
06/09/2012 09:19:38
|
not a real question
|
Understanding projectile trigonometry
===
http://www.postimg.com/72000/photo-71756.jpg
My question is demonstrated by the graphic. The aiming line is solely an example not the only solution. I'm looking for a solution that is not extreme - not a super straight line to target and not a super high shot.
I'm asking this because I have trouble understanding how it's done and what the theory is, I'd just like a concrete example.
If I didn't supply enough information please let me know, this is not a real life situation, assume virtual PC game environment.
Am I right in thinking that to solve this problem, we must know the gravity? How would we find the gravity for all possible shots without knowing anything besides the distance between two points?
| 1 |
11,647,207 |
07/25/2012 09:57:53
| 1,342,638 |
04/18/2012 22:39:37
| 14 | 2 |
Drupal - Shared Backend
|
How can I, in Drupal, install a project that have 2 different websites(frontend) but share the same backend? Is it possible?
|
php
|
drupal
|
iis
|
content-management-system
|
drupal-7
|
07/25/2012 12:10:15
|
off topic
|
Drupal - Shared Backend
===
How can I, in Drupal, install a project that have 2 different websites(frontend) but share the same backend? Is it possible?
| 2 |
5,140,375 |
02/28/2011 09:49:25
| 637,445 |
02/28/2011 09:49:25
| 1 | 0 |
optimum resolution for a web layout when designing in Photoshop?
|
First of all I want make clear that though I'm still learning CSS, I think I have fair understanding of it and especially liquid aspect of it and I also think that this is the way to go, however my question is about the graphic stage of web designing, so if I want to start a new project in Photoshop; what are the best page dimension should I use, keep in mind that I intend to use relative values when coding in CSS? and thanks in advance.
|
css
|
photoshop
| null | null | null |
02/28/2011 13:22:44
|
off topic
|
optimum resolution for a web layout when designing in Photoshop?
===
First of all I want make clear that though I'm still learning CSS, I think I have fair understanding of it and especially liquid aspect of it and I also think that this is the way to go, however my question is about the graphic stage of web designing, so if I want to start a new project in Photoshop; what are the best page dimension should I use, keep in mind that I intend to use relative values when coding in CSS? and thanks in advance.
| 2 |
6,641,786 |
07/10/2011 14:56:46
| 506,236 |
11/12/2010 20:30:46
| 1,826 | 71 |
Reloading page in Chrome causing issues with image loads
|
So this is an interesting problem and I'm not sure even where to start looking on this one. I have an MVC3 application written in C# that lists online advertisements. On the home page, it displays a list of the 10 most recent ads that have been placed with photos. Take a look at [this page][1] in Chrome. On the first page load, it loads just fine. Now hit F5. It will continue to show the "loading" indicator in the browser tab and if you scroll down, 2 or 3 of the ad images don't show up. The odd thing is that it's always images in the same area of the page (maybe the 6th, 7th or 8th image). It's never the first few and its never the last ones.
This only happens in Chrome and only when you hit F5. If you click on the "Equispot" logo at the top (which redirects you to the home page) it works just fine.
Does anyone have any idea what might be causing this or how to troubleshoot this?
[1]: http://www.equispot.com/
|
c#
|
image
|
google-chrome
| null | null | null |
open
|
Reloading page in Chrome causing issues with image loads
===
So this is an interesting problem and I'm not sure even where to start looking on this one. I have an MVC3 application written in C# that lists online advertisements. On the home page, it displays a list of the 10 most recent ads that have been placed with photos. Take a look at [this page][1] in Chrome. On the first page load, it loads just fine. Now hit F5. It will continue to show the "loading" indicator in the browser tab and if you scroll down, 2 or 3 of the ad images don't show up. The odd thing is that it's always images in the same area of the page (maybe the 6th, 7th or 8th image). It's never the first few and its never the last ones.
This only happens in Chrome and only when you hit F5. If you click on the "Equispot" logo at the top (which redirects you to the home page) it works just fine.
Does anyone have any idea what might be causing this or how to troubleshoot this?
[1]: http://www.equispot.com/
| 0 |
296,632 |
11/17/2008 19:43:44
| 32,465 |
10/29/2008 17:07:16
| 36 | 3 |
Apache Access Control
|
I'm trying to configure Apache to allow read only access and ask for user to write to a SVN repository when you are coming from the local network (10.*) but not allow any access unless logged in when coming from external network.
I sort of understand how the Order, Deny, Allow, and Limit directives work but I do not know if it is possible/how to combine them to achieve the desired result.
<Location /svn>
# Set mod_dav_svn settings
DAV svn
SVNListParentPath on
SVNParentPath /mnt/svn
AuthzSVNAccessFile /mnt/svn/.authz
# Set Authentication
AuthType Basic
AuthName "Auth Realm"
AuthUserFile /mnt/svn/.htpasswd
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 10.0.0.0/8
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
Satisfy Any
</Location>
I know this will allow all access to any local traffic but ask for login when trying to write from external traffic. This is close to what I want. Any help or suggestions on what to read are greatly appreciated.
|
apache
|
mod-dav-svn
|
svn
| null | null | null |
open
|
Apache Access Control
===
I'm trying to configure Apache to allow read only access and ask for user to write to a SVN repository when you are coming from the local network (10.*) but not allow any access unless logged in when coming from external network.
I sort of understand how the Order, Deny, Allow, and Limit directives work but I do not know if it is possible/how to combine them to achieve the desired result.
<Location /svn>
# Set mod_dav_svn settings
DAV svn
SVNListParentPath on
SVNParentPath /mnt/svn
AuthzSVNAccessFile /mnt/svn/.authz
# Set Authentication
AuthType Basic
AuthName "Auth Realm"
AuthUserFile /mnt/svn/.htpasswd
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 10.0.0.0/8
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
Satisfy Any
</Location>
I know this will allow all access to any local traffic but ask for login when trying to write from external traffic. This is close to what I want. Any help or suggestions on what to read are greatly appreciated.
| 0 |
6,717,289 |
07/16/2011 12:15:39
| 837,264 |
07/10/2011 02:41:47
| 1 | 0 |
Casting in basic data types
|
public class TestEmployee {public static void main(String args[]) { byte b=(byte)1*200; System.out.println(b); } }
I have written above simple code. But I am getting folowing error "Possible loss of precision"
As of my knowledge, when we perform integer calculations , the operands are converted to int and then the calculation in performed. And final result is in int. Now as the range of byte data type is (-128 to 127) the above calculations falls out of range of byte. So I downcast it to byte. Then why I am getting the error.
Please help and correct my concepts of casting..
|
java
| null | null | null | null | null |
open
|
Casting in basic data types
===
public class TestEmployee {public static void main(String args[]) { byte b=(byte)1*200; System.out.println(b); } }
I have written above simple code. But I am getting folowing error "Possible loss of precision"
As of my knowledge, when we perform integer calculations , the operands are converted to int and then the calculation in performed. And final result is in int. Now as the range of byte data type is (-128 to 127) the above calculations falls out of range of byte. So I downcast it to byte. Then why I am getting the error.
Please help and correct my concepts of casting..
| 0 |
9,084,853 |
01/31/2012 18:24:35
| 358,649 |
06/04/2010 16:14:55
| 426 | 3 |
Disable Internet Explorer's Post Install Setup
|
We are setting up over 20 Windows 7 machines which needs to launch IE on start up. The pain with IE (on fresh installation) is that is gives you an annoying post install popup!
![IE8][1]
[1]: http://i.stack.imgur.com/u8vho.png
Our machines are unattended (and standalone) so its not practical to click through the settings on each of the machines.
Does anyone know if IE can be launched with a parameter to disable this popup?
|
internet-explorer
| null | null | null | null |
02/01/2012 04:11:34
|
off topic
|
Disable Internet Explorer's Post Install Setup
===
We are setting up over 20 Windows 7 machines which needs to launch IE on start up. The pain with IE (on fresh installation) is that is gives you an annoying post install popup!
![IE8][1]
[1]: http://i.stack.imgur.com/u8vho.png
Our machines are unattended (and standalone) so its not practical to click through the settings on each of the machines.
Does anyone know if IE can be launched with a parameter to disable this popup?
| 2 |
2,523,891 |
03/26/2010 14:17:44
| 302,579 |
03/26/2010 14:11:58
| 1 | 0 |
Copy and delet the file from the FTP SERVER using Windows Service in c#
|
I am trying to implement a windows service that will ping a FTP site and copy its contents once in every 3 houre.
This service has functions to
1. List all files in the FTP site
2. Copy one file
3. Delete the copied file
3. Repeats step 2 and 3 for all files in the site
|
c#
| null | null | null | null | null |
open
|
Copy and delet the file from the FTP SERVER using Windows Service in c#
===
I am trying to implement a windows service that will ping a FTP site and copy its contents once in every 3 houre.
This service has functions to
1. List all files in the FTP site
2. Copy one file
3. Delete the copied file
3. Repeats step 2 and 3 for all files in the site
| 0 |
895,661 |
05/21/2009 22:50:45
| 37,947 |
11/15/2008 17:46:42
| 478 | 40 |
Receiving some nonsensical spam - what is its purpose?
|
Technically this might not be classed as a programming question, since I have already implemented a solution. But it's an interesting issue in the tech field nonetheless.
Anyway... I set up a basic contact form, without any spam protection. On discovering that it wasn't working, I ignored it and set up a Javascript to change all links pointing to the contact page to use mailto: links instead. (I intended to replace the form with an appropriate message about contacting me.) I discovered yesterday that the form is now suddenly working, because I'm getting spam from it. Here's an example:
> Message received from contact form.
> **Name**: pvenvoqks
> **Email**: [email protected]
> **Message**: Mx7orZ iafgvohkzxmv, [url=http://wxmrsloamyhf.com/]wxmrsloamyhf[/url], [link=http://gloukuwmttnj.com/]gloukuwmttnj[/link], http://vmekxmqouktx.com/
It's obviously just gibberish. I checked the links and they don't work. It seems like there is a robot just submitting random data in forms - although note that it managed to pick up that an email should be submitted in the appropriate field.
My question is, **is this spam trying to serve a purpose?** I would understand if the links led to real websites for viagra or malware or something, but they don't. It just seems totally random.
Aside: if anyone is interested, I used the "hidden field" solution to combat the spam. I used a hidden field called "Website", which, if filled in, does not send the email.
|
spam-prevention
|
spam
|
forms
|
gibberish
| null |
08/07/2011 16:02:18
|
off topic
|
Receiving some nonsensical spam - what is its purpose?
===
Technically this might not be classed as a programming question, since I have already implemented a solution. But it's an interesting issue in the tech field nonetheless.
Anyway... I set up a basic contact form, without any spam protection. On discovering that it wasn't working, I ignored it and set up a Javascript to change all links pointing to the contact page to use mailto: links instead. (I intended to replace the form with an appropriate message about contacting me.) I discovered yesterday that the form is now suddenly working, because I'm getting spam from it. Here's an example:
> Message received from contact form.
> **Name**: pvenvoqks
> **Email**: [email protected]
> **Message**: Mx7orZ iafgvohkzxmv, [url=http://wxmrsloamyhf.com/]wxmrsloamyhf[/url], [link=http://gloukuwmttnj.com/]gloukuwmttnj[/link], http://vmekxmqouktx.com/
It's obviously just gibberish. I checked the links and they don't work. It seems like there is a robot just submitting random data in forms - although note that it managed to pick up that an email should be submitted in the appropriate field.
My question is, **is this spam trying to serve a purpose?** I would understand if the links led to real websites for viagra or malware or something, but they don't. It just seems totally random.
Aside: if anyone is interested, I used the "hidden field" solution to combat the spam. I used a hidden field called "Website", which, if filled in, does not send the email.
| 2 |
11,315,414 |
07/03/2012 16:42:26
| 1,434,892 |
06/04/2012 10:15:02
| 51 | 0 |
what is SQL Stored Procedures in simple word?
|
i got this word **SQL Stored Procedures** from some article. but i can't understand what is it mean ?
and what is use of it in sql ?
|
php
|
mysql
|
sql
| null | null |
07/03/2012 16:50:00
|
not a real question
|
what is SQL Stored Procedures in simple word?
===
i got this word **SQL Stored Procedures** from some article. but i can't understand what is it mean ?
and what is use of it in sql ?
| 1 |
8,896,645 |
01/17/2012 14:50:10
| 477,496 |
10/15/2010 21:16:31
| 3 | 0 |
MP4Box stops converting at around 20 minutes
|
When I enter
<code>MP4Box -add video.264 video.m4v</code>
only videos that are below 20 minutes get process. The rest (above 20 minutes) show
<code>Error importing video.264: I/O Error</code>
Size of the video doesn't affect it, just the duration. Same installation of MP4Box works fine on my other servers. I'm running CentOS 5.7 64bit, with plenty of space.
|
centos
| null | null | null | null |
01/18/2012 08:27:59
|
off topic
|
MP4Box stops converting at around 20 minutes
===
When I enter
<code>MP4Box -add video.264 video.m4v</code>
only videos that are below 20 minutes get process. The rest (above 20 minutes) show
<code>Error importing video.264: I/O Error</code>
Size of the video doesn't affect it, just the duration. Same installation of MP4Box works fine on my other servers. I'm running CentOS 5.7 64bit, with plenty of space.
| 2 |
7,887,141 |
10/25/2011 09:18:50
| 303,513 |
02/19/2010 12:09:46
| 4,803 | 215 |
How to make Django comments use select_related() on "user" field?
|
I'm using [django comments frameworks][1]. All the comments are posted by authenticated users. Near the comment, I'm showing some user profile info using `{{ comment.user.get_profile }}`
{# custom comment list templates #}
<dl id="comments">
{% for comment in comment_list %}
<dt id="c{{ comment.id }}">
{{ comment.submit_date }} - {{ comment.user.get_profile.display_name }}
</dt>
<dd>
<p>{{ comment.comment }}</p>
</dd>
{% endfor %}
</dl>
Problem is that django's comment queries does not use `select_related()` and for 100 comments I get 101 hit on the database.
Is there a way to make django comments framework to select user profile for each comment in one go?
[1]: https://docs.djangoproject.com/en/dev/ref/contrib/comments/
|
django
|
performance
| null | null | null | null |
open
|
How to make Django comments use select_related() on "user" field?
===
I'm using [django comments frameworks][1]. All the comments are posted by authenticated users. Near the comment, I'm showing some user profile info using `{{ comment.user.get_profile }}`
{# custom comment list templates #}
<dl id="comments">
{% for comment in comment_list %}
<dt id="c{{ comment.id }}">
{{ comment.submit_date }} - {{ comment.user.get_profile.display_name }}
</dt>
<dd>
<p>{{ comment.comment }}</p>
</dd>
{% endfor %}
</dl>
Problem is that django's comment queries does not use `select_related()` and for 100 comments I get 101 hit on the database.
Is there a way to make django comments framework to select user profile for each comment in one go?
[1]: https://docs.djangoproject.com/en/dev/ref/contrib/comments/
| 0 |
7,580,378 |
09/28/2011 08:30:06
| 968,643 |
09/28/2011 08:12:12
| 1 | 0 |
css() function call failing silently?
|
I am having a strange problem with the css() function. Here's my code snippet.
console.log('' + $(this).css('left') + ':' + $(this).css('top'));
console.log('Desired position - ' + return_to_left + ':' + return_to_top);
$(this).css('top', return_to_top + 'px');
$(this).css('left', return_to_left + 'px');
console.log('Finally: ' + $(this).css('left') + ':' + $(this).css('top'));
The output I get on the console is this.
458px:2113px
Desired position - 448px:2102px;
Finally: 458px:2113px;
Could anyone suggest why this might be happening? I have tried experimenting with '!important'. Doesn't help.
(Also, for context, this code is part of a callback function after an animation. It tries to position the element back to where it was before animation began.)
Thank you for your help.
|
javascript
|
jquery
| null | null | null | null |
open
|
css() function call failing silently?
===
I am having a strange problem with the css() function. Here's my code snippet.
console.log('' + $(this).css('left') + ':' + $(this).css('top'));
console.log('Desired position - ' + return_to_left + ':' + return_to_top);
$(this).css('top', return_to_top + 'px');
$(this).css('left', return_to_left + 'px');
console.log('Finally: ' + $(this).css('left') + ':' + $(this).css('top'));
The output I get on the console is this.
458px:2113px
Desired position - 448px:2102px;
Finally: 458px:2113px;
Could anyone suggest why this might be happening? I have tried experimenting with '!important'. Doesn't help.
(Also, for context, this code is part of a callback function after an animation. It tries to position the element back to where it was before animation began.)
Thank you for your help.
| 0 |
10,016,994 |
04/04/2012 18:16:52
| 690,840 |
04/04/2011 09:25:12
| 6 | 0 |
How do you stop echo of multiple values with 'foreach' in PHP?
|
How do you when using custom fields in Wordpress echo just the first value using foreach?
Currently the code is:
<?php for(get_field('venue_event') as $post_object): ?>
<a href="<?php echo get_permalink($post_object); ?>"><?php echo get_the_title($post_object) ?></a>
<?php endforeach; ?>
This takes the field from the wordpress page (the field is a link to another page), creates a link to that page using get_permalink but when I want to echo the page title it does it, but then it also echos all other values that are not needed.
|
php
|
wordpress
|
foreach
|
echo
|
custom-fields
| null |
open
|
How do you stop echo of multiple values with 'foreach' in PHP?
===
How do you when using custom fields in Wordpress echo just the first value using foreach?
Currently the code is:
<?php for(get_field('venue_event') as $post_object): ?>
<a href="<?php echo get_permalink($post_object); ?>"><?php echo get_the_title($post_object) ?></a>
<?php endforeach; ?>
This takes the field from the wordpress page (the field is a link to another page), creates a link to that page using get_permalink but when I want to echo the page title it does it, but then it also echos all other values that are not needed.
| 0 |
7,251,932 |
08/31/2011 02:28:42
| 822,167 |
06/30/2011 00:57:03
| 8 | 0 |
Facebook auth breaks in Internet Explorer as of this week
|
We've been running a Facebook app (within an tab on Facebook) for about 2 weeks now and after dozens of hours in debugging in all browsers, we got it working smoothly handling a number of edge cases for Internet Explorer.
As of today, we are getting a Permission Denied error whenever we call either of these:
FB.getLoginStatus
FB.login
Does anyone have any idea what could be causing this? Has anything changed in the SDK?
|
facebook
|
internet-explorer
|
login
|
permissions
|
authentication
|
08/31/2011 03:52:13
|
off topic
|
Facebook auth breaks in Internet Explorer as of this week
===
We've been running a Facebook app (within an tab on Facebook) for about 2 weeks now and after dozens of hours in debugging in all browsers, we got it working smoothly handling a number of edge cases for Internet Explorer.
As of today, we are getting a Permission Denied error whenever we call either of these:
FB.getLoginStatus
FB.login
Does anyone have any idea what could be causing this? Has anything changed in the SDK?
| 2 |
10,932,282 |
06/07/2012 12:58:24
| 770,908 |
02/09/2011 04:26:03
| 357 | 7 |
XMLSerializer not working in ie
|
i have a web service which returns xml data.I am using xmlserializer for converting the data to string.But it is not working in ie
function FillPostCode(s) {
$.ajax({
type: 'Post',
data: { 'uniqueDeliveryPointID': s },
url: 'http://localhost:1051/mysite/mysiteWebService.asmx/HelloWorld',
success: function(data) {
var xmlString = (new XMLSerializer()).serializeToString(data);
SucceededCallback1(xmlString);
},
error: Error
})
}
|
javascript
|
asp.net
|
ajax
|
jquery-ajax
| null |
06/14/2012 12:19:09
|
not a real question
|
XMLSerializer not working in ie
===
i have a web service which returns xml data.I am using xmlserializer for converting the data to string.But it is not working in ie
function FillPostCode(s) {
$.ajax({
type: 'Post',
data: { 'uniqueDeliveryPointID': s },
url: 'http://localhost:1051/mysite/mysiteWebService.asmx/HelloWorld',
success: function(data) {
var xmlString = (new XMLSerializer()).serializeToString(data);
SucceededCallback1(xmlString);
},
error: Error
})
}
| 1 |
10,611,759 |
05/16/2012 03:51:40
| 1,219,992 |
02/20/2012 01:06:10
| 1 | 0 |
javascript does not run properly
|
I create a user control in ASP.NET (.ascx) that combines ArcGIS Map, and several basic control in ArcGIS Web ADF (GoToLocation, ScaleBar, and ESRI Toolbar).
The GoToLocation control is not working properly because it's javascript did not find textbox used for display X and Y coordinates and also it did not find "Zoom To" and "Pan To" button.
Then I try to fix that with this jquery script :
$(document).ready(function () {
fixGTL();
});
function fixGTL() {
var txtX = $('#[id$="_GoToLocationX"]');
var idX = txtX.attr("id");
//alert(idX);
var idX_2 = idX.split('_');
if (idX_2.length = 6) {
txtX.attr('id', idX_2[0] + '_' + idX_2[2] + '_' + idX_2[3] + '_' + idX_2[4] + '_' + idX_2[5]);
}
var txtY = $('#[id$="_GoToLocationY"]');
var idY = txtY.attr("id");
//alert(idY);
var idY_2 = idY.split('_');
if (idY_2.length = 6) {
txtY.attr('id', idY_2[0] + '_' + idY_2[2] + '_' + idY_2[3] + '_' + idY_2[4] + '_' + idY_2[5]);
}
var btnZoomTo = $('#[id$="_ZoomTo"]');
var idZoomTo = btnZoomTo.attr("id");
var idZoomTo_2 = idZoomTo.split('_');
if (idZoomTo_2.length = 6) {
btnZoomTo.attr('id', idZoomTo_2[0] + '_' + idZoomTo_2[2] + '_' + idZoomTo_2[3] + '_' + idZoomTo_2[4] + '_' + idZoomTo_2[5]);
}
var btnPanTo = $('#[id$="_PanTo"]');
var idPanTo = btnPanTo.attr("id");
var idPanTo_2 = idPanTo.split('_');
if (idPanTo_2.length = 6) {
btnPanTo.attr('id', idPanTo_2[0] + '_' + idPanTo_2[2] + '_' + idPanTo_2[3] + '_' + idPanTo_2[4] + '_' + idPanTo_2[5]);
}
}
**The problem :**
My script is successfully change textbox's ID and button's ID, but GoToLocation's javascript still can't find the textbox and button.
This is a pice of javascript code taken from Firebug (sorry, I can't post pic because I am a newbie here) :
ESRI.ADF.UI.GoToLocation.callBaseMethod(this, 'initialize');
(1) var id = this.get_id();
var splitId = id.split('_');
this._displayX = $get(splitId[0] + '_' + id + "_GoToLocationX");
this._displayY = $get(splitId[0] + '_' + id + "_GoToLocationY");
(2) this._zoomToButton = $get(splitId[0] + '_' + id + "_ZoomTo");
this._panToButton = $get(splitId[0] + '_' + id + "_PanTo");
(3) if (this._zoomToButton != null) {
$addHandler(this._zoomToButton, "mousedown", Function.createDelegate(this, this._zoomTo));
$addHandler(this._zoomToButton, "keydown", Function.createDelegate(this, this._zoomKeyPress));
}
The strange part is, when I debug with firebug on breakpoint no.1, it can find the textbox and button (_displayX, _displayY, _zoomToButton and _panToButton is not null). But if I debug from breakpoint number 2 or 3 or I load it directly (not debug in firebug) the script failed to find textbox and button.
**The Goal :**
The goal is to get _displayX, _displayY, _zoomToButton and _panToButton not getting null.
Thanks
|
javascript
|
jquery
|
asp.net
|
arcgis
| null | null |
open
|
javascript does not run properly
===
I create a user control in ASP.NET (.ascx) that combines ArcGIS Map, and several basic control in ArcGIS Web ADF (GoToLocation, ScaleBar, and ESRI Toolbar).
The GoToLocation control is not working properly because it's javascript did not find textbox used for display X and Y coordinates and also it did not find "Zoom To" and "Pan To" button.
Then I try to fix that with this jquery script :
$(document).ready(function () {
fixGTL();
});
function fixGTL() {
var txtX = $('#[id$="_GoToLocationX"]');
var idX = txtX.attr("id");
//alert(idX);
var idX_2 = idX.split('_');
if (idX_2.length = 6) {
txtX.attr('id', idX_2[0] + '_' + idX_2[2] + '_' + idX_2[3] + '_' + idX_2[4] + '_' + idX_2[5]);
}
var txtY = $('#[id$="_GoToLocationY"]');
var idY = txtY.attr("id");
//alert(idY);
var idY_2 = idY.split('_');
if (idY_2.length = 6) {
txtY.attr('id', idY_2[0] + '_' + idY_2[2] + '_' + idY_2[3] + '_' + idY_2[4] + '_' + idY_2[5]);
}
var btnZoomTo = $('#[id$="_ZoomTo"]');
var idZoomTo = btnZoomTo.attr("id");
var idZoomTo_2 = idZoomTo.split('_');
if (idZoomTo_2.length = 6) {
btnZoomTo.attr('id', idZoomTo_2[0] + '_' + idZoomTo_2[2] + '_' + idZoomTo_2[3] + '_' + idZoomTo_2[4] + '_' + idZoomTo_2[5]);
}
var btnPanTo = $('#[id$="_PanTo"]');
var idPanTo = btnPanTo.attr("id");
var idPanTo_2 = idPanTo.split('_');
if (idPanTo_2.length = 6) {
btnPanTo.attr('id', idPanTo_2[0] + '_' + idPanTo_2[2] + '_' + idPanTo_2[3] + '_' + idPanTo_2[4] + '_' + idPanTo_2[5]);
}
}
**The problem :**
My script is successfully change textbox's ID and button's ID, but GoToLocation's javascript still can't find the textbox and button.
This is a pice of javascript code taken from Firebug (sorry, I can't post pic because I am a newbie here) :
ESRI.ADF.UI.GoToLocation.callBaseMethod(this, 'initialize');
(1) var id = this.get_id();
var splitId = id.split('_');
this._displayX = $get(splitId[0] + '_' + id + "_GoToLocationX");
this._displayY = $get(splitId[0] + '_' + id + "_GoToLocationY");
(2) this._zoomToButton = $get(splitId[0] + '_' + id + "_ZoomTo");
this._panToButton = $get(splitId[0] + '_' + id + "_PanTo");
(3) if (this._zoomToButton != null) {
$addHandler(this._zoomToButton, "mousedown", Function.createDelegate(this, this._zoomTo));
$addHandler(this._zoomToButton, "keydown", Function.createDelegate(this, this._zoomKeyPress));
}
The strange part is, when I debug with firebug on breakpoint no.1, it can find the textbox and button (_displayX, _displayY, _zoomToButton and _panToButton is not null). But if I debug from breakpoint number 2 or 3 or I load it directly (not debug in firebug) the script failed to find textbox and button.
**The Goal :**
The goal is to get _displayX, _displayY, _zoomToButton and _panToButton not getting null.
Thanks
| 0 |
4,354,132 |
12/04/2010 15:05:05
| 419,346 |
08/13/2010 08:34:21
| 55 | 12 |
Saving mp3 file to iphone
|
Hi I am downloading mp3 file from a url and I want to save that file to iphone music library.How can this be done?
|
iphone
| null | null | null | null |
12/04/2010 16:04:21
|
off topic
|
Saving mp3 file to iphone
===
Hi I am downloading mp3 file from a url and I want to save that file to iphone music library.How can this be done?
| 2 |
2,904,577 |
05/25/2010 12:34:27
| 347,067 |
05/21/2010 12:27:21
| 10 | 0 |
Is C a middle-level language?
|
Is C a middle-level language? Thanx in advance...
|
c
|
programming-languages
| null | null | null |
05/26/2010 22:08:35
|
not constructive
|
Is C a middle-level language?
===
Is C a middle-level language? Thanx in advance...
| 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.