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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,507,072 | 07/16/2012 15:04:30 | 1,518,070 | 07/11/2012 14:22:46 | 29 | 0 | How do i link the individual letters to a word? | I am creating a word game where you have to spell the words in the grid by dragging the letters in from the side.
This code randomly generates 12 words from the "listOfWords" and dynamically creates a 6x6 table. The words are also split into single characters ("P""I""T") so draggable letters can be placed over to spell the words...
var listOfWords = ["mat", "cat", "dog", "pit", "pot", "fog", "log", "pan", "can", "man", "pin", "gag", "sat", "pat", "tap", "sap", "tag", "gig", "gap", "nag", "sag", "gas", "pig", "dig", "got", "not", "top", "pop", "god", "mog", "cot", "cop", "cap", "cod", "kid", "kit", "get", "pet", "ten", "net", "pen", "peg", "met", "men", "mum", "run", "mug", "cup", "sun", "mud", "rim", "ram", "rat", "rip", "rag", "rug", "rot", "dad", "sad", "dim", "dip", "did", "mam", "map", "nip", "tin", "tan", "nap", "sit", "tip", "pip", "sip", "had", "him", "his", "hot", "hut", "hop", "hum", "hit", "hat", "has", "hug", "but", "big", "bet", "bad", "bad", "bed", "bud", "beg", "bug", "bun", "bus", "bat", "bit", "fit", "fin", "fun", "fig", "fan", "fat", "lap", "lot", "let", "leg", "lit"];
var shuffledWords = listOfWords.slice(0).sort(function () {
return 0.5 - Math.random();
}).slice(0, 12);
var tbl = document.createElement('table');
tbl.className='tablestyle';
var wordsPerRow = 2;
for (var i = 0; i < shuffledWords.length; i += wordsPerRow) {
var row = document.createElement('tr');
for (var j=i; j < i + wordsPerRow; ++ j) {
var word = shuffledWords[j];
for (var k = 0; k < word.length; k++){
var cell = document.createElement('td');
cell.textContent = word[k];
// IF FIREFOX USE cell.textContent = word[j]; INSTEAD
row.appendChild(cell);
}
}
tbl.appendChild(row);
}
document.body.appendChild(tbl);
Here is the code for the draggable letters that are dropped onto the grid to spell the words.
<div class="squares">
<div id="drag1" class="drag ui-widget-content box-style2" tabindex="0">
<p>a</p>
</div>
<div id="drag2" class="drag ui-widget-content box-style" tabindex="0">
<p>b</p>
</div>
<div id="drag3" class="drag ui-widget-content box-style" tabindex="0">
<p>c</p>
</div>
<div id="drag4" class="drag ui-widget-content box-style" tabindex="0">
<p>d</p>
</div>
<div id="drag5" class="drag ui-widget-content box-style2" tabindex="0">
<p>e</p>
</div>
<div id="drag6" class="drag ui-widget-content box-style" tabindex="0">
<p>f</p>
</div>
<div id="drag7" class="drag ui-widget-content box-style" tabindex="0">
<p>g</p>
</div>
<div id="drag8" class="drag ui-widget-content box-style" tabindex="0">
<p>h</p>
</div>
<div id="drag9" class="drag ui-widget-content box-style2" tabindex="0">
<p>i</p>
</div>
<div id="drag10" class="drag ui-widget-content box-style" tabindex="0">
<p>j</p>
</div>
<div id="drag11" class="drag ui-widget-content box-style" tabindex="0">
<p>k</p>
</div>
<div id="drag12" class="drag ui-widget-content box-style" tabindex="0">
<p>l</p>
</div>
<div id="drag13" class="drag ui-widget-content box-style" tabindex="0">
<p>m</p>
</div>
<div id="drag14" class="drag ui-widget-content box-style" tabindex="0">
<p>n</p>
</div>
<div id="drag15" class="drag ui-widget-content box-style2" tabindex="0">
<p>o</p>
</div>
<div id="drag16" class="drag ui-widget-content box-style" tabindex="0">
<p>p</p>
</div>
<div id="drag17" class="drag ui-widget-content box-style" tabindex="0">
<p>r</p>
</div>
<div id="drag18" class="drag ui-widget-content box-style" tabindex="0">
<p>s</p>
</div>
<div id="drag19" class="drag ui-widget-content box-style" tabindex="0">
<p>t</p>
</div>
<div id="drag20" class="drag ui-widget-content box-style2" tabindex="0">
<p>u</p>
</div>
How do I make the words recognize the correct letters when they are dropped on top?
| jquery | jquery-ui | drag-and-drop | null | null | 07/17/2012 16:10:17 | not a real question | How do i link the individual letters to a word?
===
I am creating a word game where you have to spell the words in the grid by dragging the letters in from the side.
This code randomly generates 12 words from the "listOfWords" and dynamically creates a 6x6 table. The words are also split into single characters ("P""I""T") so draggable letters can be placed over to spell the words...
var listOfWords = ["mat", "cat", "dog", "pit", "pot", "fog", "log", "pan", "can", "man", "pin", "gag", "sat", "pat", "tap", "sap", "tag", "gig", "gap", "nag", "sag", "gas", "pig", "dig", "got", "not", "top", "pop", "god", "mog", "cot", "cop", "cap", "cod", "kid", "kit", "get", "pet", "ten", "net", "pen", "peg", "met", "men", "mum", "run", "mug", "cup", "sun", "mud", "rim", "ram", "rat", "rip", "rag", "rug", "rot", "dad", "sad", "dim", "dip", "did", "mam", "map", "nip", "tin", "tan", "nap", "sit", "tip", "pip", "sip", "had", "him", "his", "hot", "hut", "hop", "hum", "hit", "hat", "has", "hug", "but", "big", "bet", "bad", "bad", "bed", "bud", "beg", "bug", "bun", "bus", "bat", "bit", "fit", "fin", "fun", "fig", "fan", "fat", "lap", "lot", "let", "leg", "lit"];
var shuffledWords = listOfWords.slice(0).sort(function () {
return 0.5 - Math.random();
}).slice(0, 12);
var tbl = document.createElement('table');
tbl.className='tablestyle';
var wordsPerRow = 2;
for (var i = 0; i < shuffledWords.length; i += wordsPerRow) {
var row = document.createElement('tr');
for (var j=i; j < i + wordsPerRow; ++ j) {
var word = shuffledWords[j];
for (var k = 0; k < word.length; k++){
var cell = document.createElement('td');
cell.textContent = word[k];
// IF FIREFOX USE cell.textContent = word[j]; INSTEAD
row.appendChild(cell);
}
}
tbl.appendChild(row);
}
document.body.appendChild(tbl);
Here is the code for the draggable letters that are dropped onto the grid to spell the words.
<div class="squares">
<div id="drag1" class="drag ui-widget-content box-style2" tabindex="0">
<p>a</p>
</div>
<div id="drag2" class="drag ui-widget-content box-style" tabindex="0">
<p>b</p>
</div>
<div id="drag3" class="drag ui-widget-content box-style" tabindex="0">
<p>c</p>
</div>
<div id="drag4" class="drag ui-widget-content box-style" tabindex="0">
<p>d</p>
</div>
<div id="drag5" class="drag ui-widget-content box-style2" tabindex="0">
<p>e</p>
</div>
<div id="drag6" class="drag ui-widget-content box-style" tabindex="0">
<p>f</p>
</div>
<div id="drag7" class="drag ui-widget-content box-style" tabindex="0">
<p>g</p>
</div>
<div id="drag8" class="drag ui-widget-content box-style" tabindex="0">
<p>h</p>
</div>
<div id="drag9" class="drag ui-widget-content box-style2" tabindex="0">
<p>i</p>
</div>
<div id="drag10" class="drag ui-widget-content box-style" tabindex="0">
<p>j</p>
</div>
<div id="drag11" class="drag ui-widget-content box-style" tabindex="0">
<p>k</p>
</div>
<div id="drag12" class="drag ui-widget-content box-style" tabindex="0">
<p>l</p>
</div>
<div id="drag13" class="drag ui-widget-content box-style" tabindex="0">
<p>m</p>
</div>
<div id="drag14" class="drag ui-widget-content box-style" tabindex="0">
<p>n</p>
</div>
<div id="drag15" class="drag ui-widget-content box-style2" tabindex="0">
<p>o</p>
</div>
<div id="drag16" class="drag ui-widget-content box-style" tabindex="0">
<p>p</p>
</div>
<div id="drag17" class="drag ui-widget-content box-style" tabindex="0">
<p>r</p>
</div>
<div id="drag18" class="drag ui-widget-content box-style" tabindex="0">
<p>s</p>
</div>
<div id="drag19" class="drag ui-widget-content box-style" tabindex="0">
<p>t</p>
</div>
<div id="drag20" class="drag ui-widget-content box-style2" tabindex="0">
<p>u</p>
</div>
How do I make the words recognize the correct letters when they are dropped on top?
| 1 |
9,295,247 | 02/15/2012 14:32:35 | 877,529 | 08/03/2011 22:02:04 | 80 | 0 | Java game programming and Thread | I want to know what is the better way to develop a game in Java with Swing.
It's a Shoot them up, and now all things are using thread.
For example : all explosion use threads, all shoot use threads, all enemy use threads, all shoot enemy use threads...
So up to now I don't use a main game loop to display element and do the math to move elements.
It would be a better way to use threads only for explosions, and use a sequential method to shoot, ennemy ?
I'm not sure to be very clear in my question.
Thanks | java | multithreading | swing | null | null | 02/15/2012 17:06:38 | not a real question | Java game programming and Thread
===
I want to know what is the better way to develop a game in Java with Swing.
It's a Shoot them up, and now all things are using thread.
For example : all explosion use threads, all shoot use threads, all enemy use threads, all shoot enemy use threads...
So up to now I don't use a main game loop to display element and do the math to move elements.
It would be a better way to use threads only for explosions, and use a sequential method to shoot, ennemy ?
I'm not sure to be very clear in my question.
Thanks | 1 |
4,961,354 | 02/10/2011 18:54:52 | 9,382 | 09/15/2008 18:36:29 | 7,621 | 154 | Having trouble rendering the HTML5 Slider vertically | I am using JQuery Mobile to render a Slider and it works great. However, I am having trouble getting it to show up vertically. The specs say (at least my reading of them) that the slider figures out whether to show up vertically or horizontally based on the height/width, but it's not working in my case. What am I doing wrong?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<style type="text/css">
#wheel1Speed { height: 300px; width: 100px;}
</style>
</head>
<body>
<div data-role="page">
<div data-role="content">
<input type="range" name="wheel1speed" id="wheel1speed"
value="0" min="-100" max="100" data-theme="b" data-track-theme="a" />
</div><!-- /content -->
</div><!-- /page -->
</body>
</html> | javascript | jquery | html5 | slider | jquery-mobile | null | open | Having trouble rendering the HTML5 Slider vertically
===
I am using JQuery Mobile to render a Slider and it works great. However, I am having trouble getting it to show up vertically. The specs say (at least my reading of them) that the slider figures out whether to show up vertically or horizontally based on the height/width, but it's not working in my case. What am I doing wrong?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<style type="text/css">
#wheel1Speed { height: 300px; width: 100px;}
</style>
</head>
<body>
<div data-role="page">
<div data-role="content">
<input type="range" name="wheel1speed" id="wheel1speed"
value="0" min="-100" max="100" data-theme="b" data-track-theme="a" />
</div><!-- /content -->
</div><!-- /page -->
</body>
</html> | 0 |
9,422,720 | 02/23/2012 22:52:35 | 619,010 | 02/16/2011 04:12:41 | 41 | 1 | Advertising Links Websites | I have recently noticed that when i visit certain websites, there are usually links tied to certain words. I can't find an answer from where i have looked, and i have noticed similar trends from several websites, but especially my own.
Is this a programming, hack issue that can be solved by adding specific code or is it my hosting company doing this, or does it mean that someone has gained control to my ftp portal?
Please see the image below of what i mean and any help would be appreciated.
![enter image description here][1]
[1]: http://i.stack.imgur.com/m5bH1.png | javascript | web-services | ftp | web-hosting | null | 02/23/2012 23:04:07 | off topic | Advertising Links Websites
===
I have recently noticed that when i visit certain websites, there are usually links tied to certain words. I can't find an answer from where i have looked, and i have noticed similar trends from several websites, but especially my own.
Is this a programming, hack issue that can be solved by adding specific code or is it my hosting company doing this, or does it mean that someone has gained control to my ftp portal?
Please see the image below of what i mean and any help would be appreciated.
![enter image description here][1]
[1]: http://i.stack.imgur.com/m5bH1.png | 2 |
8,806,692 | 01/10/2012 16:26:39 | 363,751 | 06/10/2010 17:22:46 | 7,573 | 1,074 | Simulating multiple instances of an embedded processor | I'm working on a project which will entail multiple devices, each with an embedded (ARM) processor, communicating. One development approach which I have found useful in the past with projects that only entailed a single embedded processor was develop the code using Visual Studio, divided into three portions:
<ol>
<li>Main application code (in unmanaged C/C++ [see note])
<li>I/O-simulating code (C/C++) that runs under Visual Studio
<li>Embedded I/O code (C), which Visual Studio is instructed not to build, runs on the target system. Previously this code was for the PIC; for most future projects I'm migrating to the ARM.
</ol>
Feeding the embedded compiler/linker the code from parts 1 and 3 yields a hex file that can run on the target system. Running parts 1 and 2 together yields code which can run on the PC, with the benefit of better debugging tools and more precise control over I/O behavior (e.g. I can make the simulation code introduce certain types of random hiccups more easily than I can induce controlled hiccups on real hardware).
Target code is written in C, but the simulation environment uses C++ so as to simulate I/O registers. For example, I have a PortArray data structure; the header file for the embedded compiler includes a line like `unsigned char LATA @ 0xF89;` and my header file for simulation includes `#define LATA _IOBIT(f89,1)` which in turn invokes a macro that accesses a suitable property of an I/O object, so a statement like `LATA |= 4;` will read the simulated latch, "or" the read value with 4, and write the new value. To make this work, the target code has to compile under C++ as well as under C, but this mostly isn't a problem. The biggest annoyance is probably with `enum` types (which behave as integers in C, but have to be coaxed to do so in C++).
Previously, I've used two approaches to making the simulation interactive:
<ol><li>Compile and link a DLL with target-application and simulation code, and have VB code in the same project which interacts with it.
<li>Compile the target-application code and some simulation code to an EXE with instance of Visual Studio, and use a second instance of Visual Studio for the simulation-UI. Have the two programs communicate via TCP, so nearly all "real" I/O logic is in the simulation program. For example, the aforementioned `LATA |= 4;` would send a "read port 0xF89" command to the TCP port, get the response, process the received value, and send a "write port 0xF89" command with the result.</ol>
I've found the latter approach to run a tiny bit slower than the former in some cases, but it seems much more convenient for debugging, since I can suspend execution of the unmanaged simulation code while the simulation UI remains responsive. Indeed, for simulating a single target device at a time, I think the latter approach works extremely well. My question is how I should best go about simulating a plurality of target devices (e.g. 16 of them).
The difficulty I have is figuring out how to make each simulated instance get its own set of global variables. If I were to compile to an EXE and run one instance of the EXE for each simulated target device, that would work, but I don't know any practical way to maintain debugger support while doing that. Another approach would be to arrange the target code so that everything would compile as one module joined together via `#include`. For simulation purposes, everything could then be wrapped into a single C++ class, with global variables turning into class-instance variables. That would be a bit more object-oriented, but I really don't like the idea of forcing all the application code to live in one compiled and linked module.
What would perhaps be ideal would be if the code could load multiple instances of the DLL, each with its own set of global variables. I have no idea how to do that, however, nor do I know how to make things interact with the debugger. I don't think it's really necessary that all simulated target devices actually execute code simultaneously; it would be perfectly acceptable for simulation instances to use cooperative multitasking. If there were some way of finding out what range of memory holds the global variables, it might be possible to have the 'task-switch' method swap out all of the global variables used by the previously-running instance and swap in the contents applicable to the instance being switched in. Although I'd know how to do that in an embedded context, though, I'd have no idea how to do that on the PC.
Any useful thoughts? | vb.net | visual-studio | embedded | simulation | null | null | open | Simulating multiple instances of an embedded processor
===
I'm working on a project which will entail multiple devices, each with an embedded (ARM) processor, communicating. One development approach which I have found useful in the past with projects that only entailed a single embedded processor was develop the code using Visual Studio, divided into three portions:
<ol>
<li>Main application code (in unmanaged C/C++ [see note])
<li>I/O-simulating code (C/C++) that runs under Visual Studio
<li>Embedded I/O code (C), which Visual Studio is instructed not to build, runs on the target system. Previously this code was for the PIC; for most future projects I'm migrating to the ARM.
</ol>
Feeding the embedded compiler/linker the code from parts 1 and 3 yields a hex file that can run on the target system. Running parts 1 and 2 together yields code which can run on the PC, with the benefit of better debugging tools and more precise control over I/O behavior (e.g. I can make the simulation code introduce certain types of random hiccups more easily than I can induce controlled hiccups on real hardware).
Target code is written in C, but the simulation environment uses C++ so as to simulate I/O registers. For example, I have a PortArray data structure; the header file for the embedded compiler includes a line like `unsigned char LATA @ 0xF89;` and my header file for simulation includes `#define LATA _IOBIT(f89,1)` which in turn invokes a macro that accesses a suitable property of an I/O object, so a statement like `LATA |= 4;` will read the simulated latch, "or" the read value with 4, and write the new value. To make this work, the target code has to compile under C++ as well as under C, but this mostly isn't a problem. The biggest annoyance is probably with `enum` types (which behave as integers in C, but have to be coaxed to do so in C++).
Previously, I've used two approaches to making the simulation interactive:
<ol><li>Compile and link a DLL with target-application and simulation code, and have VB code in the same project which interacts with it.
<li>Compile the target-application code and some simulation code to an EXE with instance of Visual Studio, and use a second instance of Visual Studio for the simulation-UI. Have the two programs communicate via TCP, so nearly all "real" I/O logic is in the simulation program. For example, the aforementioned `LATA |= 4;` would send a "read port 0xF89" command to the TCP port, get the response, process the received value, and send a "write port 0xF89" command with the result.</ol>
I've found the latter approach to run a tiny bit slower than the former in some cases, but it seems much more convenient for debugging, since I can suspend execution of the unmanaged simulation code while the simulation UI remains responsive. Indeed, for simulating a single target device at a time, I think the latter approach works extremely well. My question is how I should best go about simulating a plurality of target devices (e.g. 16 of them).
The difficulty I have is figuring out how to make each simulated instance get its own set of global variables. If I were to compile to an EXE and run one instance of the EXE for each simulated target device, that would work, but I don't know any practical way to maintain debugger support while doing that. Another approach would be to arrange the target code so that everything would compile as one module joined together via `#include`. For simulation purposes, everything could then be wrapped into a single C++ class, with global variables turning into class-instance variables. That would be a bit more object-oriented, but I really don't like the idea of forcing all the application code to live in one compiled and linked module.
What would perhaps be ideal would be if the code could load multiple instances of the DLL, each with its own set of global variables. I have no idea how to do that, however, nor do I know how to make things interact with the debugger. I don't think it's really necessary that all simulated target devices actually execute code simultaneously; it would be perfectly acceptable for simulation instances to use cooperative multitasking. If there were some way of finding out what range of memory holds the global variables, it might be possible to have the 'task-switch' method swap out all of the global variables used by the previously-running instance and swap in the contents applicable to the instance being switched in. Although I'd know how to do that in an embedded context, though, I'd have no idea how to do that on the PC.
Any useful thoughts? | 0 |
6,531,199 | 06/30/2011 07:13:47 | 310,011 | 04/06/2010 12:41:35 | 260 | 19 | What would be the best solution for routing in an Android application? | I've been looking a bit for some possibility to show a route on a Google Map inside an Android application. Since the new SDK doesn't provide DrivingDirections anymore.
I have found for example this topic: [J2ME/Android/BlackBerry - driving directions, route between two locations][1] which seems to be fine but as the topic author already stated, it's violating the "Google Maps/Google Earth APIs Terms of Service" so it's not really reliable solution I think.
I was looking around OpenStreetMap which provides such service but unfortunately I didn't found any possibility to get results for a routing for a third part application.
Beside them there is [Nutiteq Mobile Mapping library][2] which seems to be closer to what I'm looking for but unfortunately it's GPL. Please don't get me wrong, I'm a really big fan of open source I just think that GPL is the worst licence for a library from all open source licenses.
Is there is some other library which provides routing possibilities for an Android App?
Or maybe there is some possibility to get routing results from OpenStreetMap for example in an exchangeable format (XML, JSON)?
Regards,
Radek
[1]: http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations/2023685#2023685
[2]: http://www.nutiteq.com/android-mapping-api-sdk | android | google-maps | routing | navigation | openstreetmap | 07/15/2012 17:03:22 | not constructive | What would be the best solution for routing in an Android application?
===
I've been looking a bit for some possibility to show a route on a Google Map inside an Android application. Since the new SDK doesn't provide DrivingDirections anymore.
I have found for example this topic: [J2ME/Android/BlackBerry - driving directions, route between two locations][1] which seems to be fine but as the topic author already stated, it's violating the "Google Maps/Google Earth APIs Terms of Service" so it's not really reliable solution I think.
I was looking around OpenStreetMap which provides such service but unfortunately I didn't found any possibility to get results for a routing for a third part application.
Beside them there is [Nutiteq Mobile Mapping library][2] which seems to be closer to what I'm looking for but unfortunately it's GPL. Please don't get me wrong, I'm a really big fan of open source I just think that GPL is the worst licence for a library from all open source licenses.
Is there is some other library which provides routing possibilities for an Android App?
Or maybe there is some possibility to get routing results from OpenStreetMap for example in an exchangeable format (XML, JSON)?
Regards,
Radek
[1]: http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations/2023685#2023685
[2]: http://www.nutiteq.com/android-mapping-api-sdk | 4 |
6,719,072 | 07/16/2011 17:35:33 | 847,967 | 07/16/2011 17:12:44 | 4 | 0 | Installing JDK in LInux The download file appears to be corrupted. |
I have downloaded JDK ,but when i am trying to extract it , i am facing these errors
Please help .
[root@ras java]# . jdk-6u26-linux-i586.bin
Unpacking...
tail: cannot open `bash' for reading: No such file or directory
Checksumming...
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
You have new mail in /var/spool/mail/root
[root@ras ~]# | linux | null | null | null | null | 07/17/2011 10:07:18 | off topic | Installing JDK in LInux The download file appears to be corrupted.
===
I have downloaded JDK ,but when i am trying to extract it , i am facing these errors
Please help .
[root@ras java]# . jdk-6u26-linux-i586.bin
Unpacking...
tail: cannot open `bash' for reading: No such file or directory
Checksumming...
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
You have new mail in /var/spool/mail/root
[root@ras ~]# | 2 |
6,755,017 | 07/19/2011 22:45:44 | 592,747 | 01/27/2011 19:04:13 | 76 | 3 | Exceptions and Python | I'm very new to Python and I have a problem which I thought I had solved but it keeps occurring. I have something similar to the following.
def funct1()
dosomestuff
funct2()
def funct2()
dosomestuff
funct3()
def funct3()
dosomestuff
funct1()
def exceptionRecovery()
checksomethings
funct1() or funct2() or funct3()
try:
funct1()
except:
exceptionRecovery()
Now, my problem is, that this program is NEVER supposed to exit. The exceptionRecovery is supposed to check several things and start the correct function depending on the state of some various things. However, I am still getting crashes out of the program which confuses the hell out of me. Can someone please show me what I am doing wrong? | python | exception | null | null | null | null | open | Exceptions and Python
===
I'm very new to Python and I have a problem which I thought I had solved but it keeps occurring. I have something similar to the following.
def funct1()
dosomestuff
funct2()
def funct2()
dosomestuff
funct3()
def funct3()
dosomestuff
funct1()
def exceptionRecovery()
checksomethings
funct1() or funct2() or funct3()
try:
funct1()
except:
exceptionRecovery()
Now, my problem is, that this program is NEVER supposed to exit. The exceptionRecovery is supposed to check several things and start the correct function depending on the state of some various things. However, I am still getting crashes out of the program which confuses the hell out of me. Can someone please show me what I am doing wrong? | 0 |
6,920,413 | 08/03/2011 00:36:11 | 568,173 | 01/08/2011 17:00:49 | 73 | 0 | Shell script input | #!/bin/sh
if test -n $1
then
echo "Some input entered"
echo $1
else
echo "no input entered"
fi
The above code is supposed to say "no input entered" if I dont pass an argument to the shell script. the echo $1 shows a blank line when I dont pass any arguments.
| unix | shell | null | null | null | null | open | Shell script input
===
#!/bin/sh
if test -n $1
then
echo "Some input entered"
echo $1
else
echo "no input entered"
fi
The above code is supposed to say "no input entered" if I dont pass an argument to the shell script. the echo $1 shows a blank line when I dont pass any arguments.
| 0 |
2,896,483 | 05/24/2010 11:10:44 | 348,872 | 05/24/2010 11:10:44 | 1 | 0 | C# reading Emails from MS Exchange | Hi I am new to c# and have been asked to read in the title and contents of emails that arrive in a particular email account and them store them in SQL. I initially thought this must be easy but I cannot find any simple tutorials or samples.
Can anyone help?
thanks | c# | email | reader | null | null | null | open | C# reading Emails from MS Exchange
===
Hi I am new to c# and have been asked to read in the title and contents of emails that arrive in a particular email account and them store them in SQL. I initially thought this must be easy but I cannot find any simple tutorials or samples.
Can anyone help?
thanks | 0 |
4,654,458 | 01/11/2011 05:17:42 | 554,666 | 12/27/2010 05:08:45 | 1 | 0 | In wordpress the page cant be re-edited or updated? | im using wordpress 3.0.4 i have a error in page/post cant be re-edited or cant updated and also the images are cant be resized it. can any one help me ?
~ram
http://ramkumarbe.tk | wordpress | null | null | null | null | 11/17/2011 15:25:57 | not a real question | In wordpress the page cant be re-edited or updated?
===
im using wordpress 3.0.4 i have a error in page/post cant be re-edited or cant updated and also the images are cant be resized it. can any one help me ?
~ram
http://ramkumarbe.tk | 1 |
5,080,676 | 02/22/2011 16:09:52 | 628,643 | 02/22/2011 16:09:52 | 1 | 0 | Positioning Div's | I am trying to position 2 Divs.
I want to have a strip spread 100% across the bottom of the page with a height of 100px and for the div to take up all of the space above it. I would like the top div to scroll and for the bottom one to have no scroll capability. Does anyone know how to code this? I am using the below code:
#menubar
{
width:100%;
height:100px;
position: absolute;
}
#content
{
width:100%;
height:530px;
position: absolute;
}
Thank you in advance :) | div | positioning | div-layouts | null | null | null | open | Positioning Div's
===
I am trying to position 2 Divs.
I want to have a strip spread 100% across the bottom of the page with a height of 100px and for the div to take up all of the space above it. I would like the top div to scroll and for the bottom one to have no scroll capability. Does anyone know how to code this? I am using the below code:
#menubar
{
width:100%;
height:100px;
position: absolute;
}
#content
{
width:100%;
height:530px;
position: absolute;
}
Thank you in advance :) | 0 |
10,841,654 | 05/31/2012 21:39:36 | 1,228,005 | 02/23/2012 09:50:46 | 37 | 7 | Phonegap based web application generated by GWT comiler doesn't run on xcode simulator | I'm using GWT to create the UI for my Mobile application and move the compiled code to a phonegap application.
Every thing works fine in Android simulator (and Galaxy S2). But when trying to create an iphone application, I got a blank page without any worning or error.
I'm stuck in this problem even though I followed all the instructions in the getting started tutorial http://docs.phonegap.com/en/1.7.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS. Have you please any idea?
GWT version: 2.4,
JDK: 1.6,
Phonegap cordova: 1.7 | ios | gwt | phonegap | ios-simulator | cordova | null | open | Phonegap based web application generated by GWT comiler doesn't run on xcode simulator
===
I'm using GWT to create the UI for my Mobile application and move the compiled code to a phonegap application.
Every thing works fine in Android simulator (and Galaxy S2). But when trying to create an iphone application, I got a blank page without any worning or error.
I'm stuck in this problem even though I followed all the instructions in the getting started tutorial http://docs.phonegap.com/en/1.7.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS. Have you please any idea?
GWT version: 2.4,
JDK: 1.6,
Phonegap cordova: 1.7 | 0 |
8,153,358 | 11/16/2011 14:35:58 | 1,010,874 | 10/24/2011 12:42:56 | 1 | 0 | Management running process | Some console application working on my computer.
when, a process throw exception, I want open again. How can I do it with .net c# ? | c# | process-management | null | null | null | 11/16/2011 20:50:33 | not a real question | Management running process
===
Some console application working on my computer.
when, a process throw exception, I want open again. How can I do it with .net c# ? | 1 |
4,862,265 | 02/01/2011 12:00:45 | 598,322 | 02/01/2011 11:58:24 | 1 | 0 | Sort vs Type in Sorted Algebra | What is the difference between 'sort' and 'type' in sorted algebra?
Can a sort have subtypes?
e.g. If I have to model a periodic table, do I have to create a sort for each element or a sort for whole periodic table can work? If yes, how do I differentiate between different properties within a sort. | algebra | abstract-algebra | null | null | null | 06/04/2011 20:23:35 | off topic | Sort vs Type in Sorted Algebra
===
What is the difference between 'sort' and 'type' in sorted algebra?
Can a sort have subtypes?
e.g. If I have to model a periodic table, do I have to create a sort for each element or a sort for whole periodic table can work? If yes, how do I differentiate between different properties within a sort. | 2 |
6,136,602 | 05/26/2011 09:45:40 | 710,051 | 04/15/2011 15:04:05 | 29 | 0 | Method is abstract or not | Im getting the method (MethodDeclaration) for each class.
now i want to know if the method return type is abstract or not ?
how can i do that ? | methods | null | null | null | null | 05/26/2011 10:26:59 | not a real question | Method is abstract or not
===
Im getting the method (MethodDeclaration) for each class.
now i want to know if the method return type is abstract or not ?
how can i do that ? | 1 |
11,723,555 | 07/30/2012 14:27:27 | 1,561,176 | 07/29/2012 15:54:10 | 1 | 2 | how can i get random files from the internet | disregarding the danger of getting random files from the internet.
my purpose is to gather a database of files of all sorts of types for testing purposes. and these files must be as "real" as possible, hence the desire to write a code/script that can search the internet for files of a desired type and save them to a directory.
so far i have managed only to get random images of different types automatically, but for every other file type my attempts up to now have been futile.
i was thinking about using google, but realized that with the amount of requests i will send them, i will probably get throttled, and or IP banned, so that is not an option.
i have tried many things, but in the interest of keeping this question concise and perhaps getting better methods, i will not list them here. | database | file | data | automation | internet | 07/31/2012 15:00:24 | not a real question | how can i get random files from the internet
===
disregarding the danger of getting random files from the internet.
my purpose is to gather a database of files of all sorts of types for testing purposes. and these files must be as "real" as possible, hence the desire to write a code/script that can search the internet for files of a desired type and save them to a directory.
so far i have managed only to get random images of different types automatically, but for every other file type my attempts up to now have been futile.
i was thinking about using google, but realized that with the amount of requests i will send them, i will probably get throttled, and or IP banned, so that is not an option.
i have tried many things, but in the interest of keeping this question concise and perhaps getting better methods, i will not list them here. | 1 |
9,710,442 | 03/14/2012 21:19:12 | 996,145 | 10/14/2011 20:50:13 | 39 | 0 | Which book should i buy for .net | I am looking at two version of the same book
Murach's ASP.NET 2.0 Web Programming
with C# 2005
and
Murach's ASP.NET 4 Web Programming
with C# 2010
I am early in my career and am developing web pages in asp.net on the .net2.0 framework. Are the differences between these two books going to be so dramatic that I should stick to the first book? I am looking for a book that teaches me the basics of web programming and I used this companies books for sql server and really like them, but I am worried that if I get the later addition of the book I can use it to learn how to design pages but wont be able to use it as a reference for my job.
Any input is appreciated thank you
| asp.net | .net-4.0 | books | .net-2.0 | null | 03/14/2012 22:06:52 | not constructive | Which book should i buy for .net
===
I am looking at two version of the same book
Murach's ASP.NET 2.0 Web Programming
with C# 2005
and
Murach's ASP.NET 4 Web Programming
with C# 2010
I am early in my career and am developing web pages in asp.net on the .net2.0 framework. Are the differences between these two books going to be so dramatic that I should stick to the first book? I am looking for a book that teaches me the basics of web programming and I used this companies books for sql server and really like them, but I am worried that if I get the later addition of the book I can use it to learn how to design pages but wont be able to use it as a reference for my job.
Any input is appreciated thank you
| 4 |
6,996,643 | 08/09/2011 13:08:52 | 11,741 | 09/16/2008 10:49:49 | 491 | 78 | Automatically resize ActiveX object in browser | I'm programming activex component and adding it to html with object-tag. Is there a way to modify the height of this component dynamically, based on the contents (of activex)? Should I somehow call javascript code from inside c++ code, and ask javascript to resize object-element using DOM?
| activex | resize | null | null | null | null | open | Automatically resize ActiveX object in browser
===
I'm programming activex component and adding it to html with object-tag. Is there a way to modify the height of this component dynamically, based on the contents (of activex)? Should I somehow call javascript code from inside c++ code, and ask javascript to resize object-element using DOM?
| 0 |
9,681,398 | 03/13/2012 09:30:20 | 617,485 | 02/15/2011 09:19:53 | 392 | 10 | Looking for a microcontroller for Audio DSP applications | I'm currently researching a system that has the ability to playback multiple sound files from an SD-card, add them together then output the signal to a DAC.
I'm basically looking for specifications on how fast the SPI port of any given DSP microcontroller would need be to playback 16 songs (or alternatively 1 song * 16), the sampling frequency is 44.1kHz standard CD quality.
And if anybody knows a good microcontroller (with strong development documentation) for this application..
This feat is the only bottle neck I can currently see in the overall system design, if I can overcome this 16 song playback hurdle, it's all downhill from here.
Thanks very much,
Oliver | signal-processing | sd-card | microcontroller | avr | spi | 03/13/2012 13:08:50 | off topic | Looking for a microcontroller for Audio DSP applications
===
I'm currently researching a system that has the ability to playback multiple sound files from an SD-card, add them together then output the signal to a DAC.
I'm basically looking for specifications on how fast the SPI port of any given DSP microcontroller would need be to playback 16 songs (or alternatively 1 song * 16), the sampling frequency is 44.1kHz standard CD quality.
And if anybody knows a good microcontroller (with strong development documentation) for this application..
This feat is the only bottle neck I can currently see in the overall system design, if I can overcome this 16 song playback hurdle, it's all downhill from here.
Thanks very much,
Oliver | 2 |
11,618,837 | 07/23/2012 19:05:35 | 1,385,897 | 05/10/2012 00:25:50 | 28 | 0 | Exceptions in Android Application | I am developing an android application for both tablets and mobile phones. I wrote my own fragment classes and their corresponding activities. But when I am running the application I am getting the following errors.
LogCat
07-23 18:56:10.200: E/AndroidRuntime(691): FATAL EXCEPTION: main
07-23 18:56:10.200: E/AndroidRuntime(691): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fxpal.unity.android/com.fxpal.unity.android.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.os.Looper.loop(Looper.java:137)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-23 18:56:10.200: E/AndroidRuntime(691): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 18:56:10.200: E/AndroidRuntime(691): at java.lang.reflect.Method.invoke(Method.java:511)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-23 18:56:10.200: E/AndroidRuntime(691): at dalvik.system.NativeStart.main(Native Method)
07-23 18:56:10.200: E/AndroidRuntime(691): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.setContentView(Activity.java:1835)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.MainActivity.onCreate(MainActivity.java:20)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.performCreate(Activity.java:4465)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-23 18:56:10.200: E/AndroidRuntime(691): ... 11 more
07-23 18:56:10.200: E/AndroidRuntime(691): Caused by: java.lang.NullPointerException
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.EveryoneAdapter.<init>(EveryoneAdapter.java:24)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.GridFragment.onCreateView(GridFragment.java:21)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:806)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1010)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1108)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.onCreateView(Activity.java:4243)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
07-23 18:56:10.200: E/AndroidRuntime(691): ... 21 more
And my GridFragment class is
package com.fxpal.unity.android;
import com.fxpal.unity.android.EveryoneAdapter;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
public class GridFragment extends Fragment{
public UnityMobileApp appCtx;
public EveryoneAdapter everyoneAdapter;
@Override
public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.gridview,container,false);
if(everyoneAdapter == null || everyoneAdapter.getCount()!=appCtx.everyone.size()){
GridView gridView = (GridView) view.findViewById(R.id.gridView);
gridView.setAdapter(new EveryoneAdapter( view.getContext(),appCtx));
}// uses the view to get the context instead of getActivity().
else
{
everyoneAdapter.notifyDataSetChanged();
}
return view;
}
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
}
My IndividualViewFragment class is below
package com.fxpal.unity.android;
import com.fxpal.unity.android.Person;
import android.app.Dialog;
import android.app.Fragment;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
public class IndividualViewFragment extends Fragment {
private static final String DB_TAG = "IndividualView";
private ImageView userImage;
private Person personToDisplay;
protected String numToCall, numtype;
//private DatabaseHelper db;
//private UnityMobileApp appCtx;
protected static final int DIALOG_VIEW_CALENDAR = 2;
protected static final int MESSAGE_CONNECTION_ERROR_TOAST = 0;
//private static final String DEBUG_TAG = "unity.IndividualViewActivity";
private final Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_CONNECTION_ERROR_TOAST:
Toast.makeText(getActivity(), Consts.CONNECTION_ERROR_MESSAGE, Toast.LENGTH_SHORT).show();
break;
}
}
};
private SharedPreferences prefs;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
View view = (LinearLayout) inflater.inflate(R.layout.individual_view, container, false);
//db = new DatabaseHelper(appCtx);
// appCtx = (UnityMobileApp) getActivity().getApplication();
userImage = (ImageView)getView().findViewById(R.id.individualUserImage);
return view;
}
public void onPause(){
super.onPause();
}
public void onDestroy(){
super.onDestroy();
//doUnbindService();
//db.close();
}
public void onResume(){
super.onResume();
//personToDisplay = appCtx.getEveryone().get(username);
updateView();
//updateInfo();
}
private void updateView(){
userImage.setImageBitmap(personToDisplay.getRoundedImage(Consts.LARGE_USER_IMAGE_SIZE, Consts.LARGE_USER_IMAGE_BORDER));
}
}
And my Manifest file is below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fxpal.unity.android"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/unity_icon"
android:label="@string/app_name"
android:name=".UnityMobileApp"
android:theme="@android:style/Theme.Holo" android:logo="@drawable/fuji_xerox_logo_125">
<activity
android:label="@string/app_name"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".IndividualViewActivity"
android:label="@string/app_name" android:theme="@style/PageStyle">
</activity>
<service android:name=".ReportingService" />
<receiver android:name=".StartupReceiver"/>
</application>
</manifest>
Please help me. I am unable to find where the problem is.
Regards,
Rakesh
| android | android-layout | android-fragments | android-fragmentactivity | null | null | open | Exceptions in Android Application
===
I am developing an android application for both tablets and mobile phones. I wrote my own fragment classes and their corresponding activities. But when I am running the application I am getting the following errors.
LogCat
07-23 18:56:10.200: E/AndroidRuntime(691): FATAL EXCEPTION: main
07-23 18:56:10.200: E/AndroidRuntime(691): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fxpal.unity.android/com.fxpal.unity.android.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.os.Looper.loop(Looper.java:137)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-23 18:56:10.200: E/AndroidRuntime(691): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 18:56:10.200: E/AndroidRuntime(691): at java.lang.reflect.Method.invoke(Method.java:511)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-23 18:56:10.200: E/AndroidRuntime(691): at dalvik.system.NativeStart.main(Native Method)
07-23 18:56:10.200: E/AndroidRuntime(691): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.setContentView(Activity.java:1835)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.MainActivity.onCreate(MainActivity.java:20)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.performCreate(Activity.java:4465)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-23 18:56:10.200: E/AndroidRuntime(691): ... 11 more
07-23 18:56:10.200: E/AndroidRuntime(691): Caused by: java.lang.NullPointerException
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.EveryoneAdapter.<init>(EveryoneAdapter.java:24)
07-23 18:56:10.200: E/AndroidRuntime(691): at com.fxpal.unity.android.GridFragment.onCreateView(GridFragment.java:21)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:806)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1010)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1108)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.app.Activity.onCreateView(Activity.java:4243)
07-23 18:56:10.200: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
07-23 18:56:10.200: E/AndroidRuntime(691): ... 21 more
And my GridFragment class is
package com.fxpal.unity.android;
import com.fxpal.unity.android.EveryoneAdapter;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
public class GridFragment extends Fragment{
public UnityMobileApp appCtx;
public EveryoneAdapter everyoneAdapter;
@Override
public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.gridview,container,false);
if(everyoneAdapter == null || everyoneAdapter.getCount()!=appCtx.everyone.size()){
GridView gridView = (GridView) view.findViewById(R.id.gridView);
gridView.setAdapter(new EveryoneAdapter( view.getContext(),appCtx));
}// uses the view to get the context instead of getActivity().
else
{
everyoneAdapter.notifyDataSetChanged();
}
return view;
}
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
}
My IndividualViewFragment class is below
package com.fxpal.unity.android;
import com.fxpal.unity.android.Person;
import android.app.Dialog;
import android.app.Fragment;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
public class IndividualViewFragment extends Fragment {
private static final String DB_TAG = "IndividualView";
private ImageView userImage;
private Person personToDisplay;
protected String numToCall, numtype;
//private DatabaseHelper db;
//private UnityMobileApp appCtx;
protected static final int DIALOG_VIEW_CALENDAR = 2;
protected static final int MESSAGE_CONNECTION_ERROR_TOAST = 0;
//private static final String DEBUG_TAG = "unity.IndividualViewActivity";
private final Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_CONNECTION_ERROR_TOAST:
Toast.makeText(getActivity(), Consts.CONNECTION_ERROR_MESSAGE, Toast.LENGTH_SHORT).show();
break;
}
}
};
private SharedPreferences prefs;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
View view = (LinearLayout) inflater.inflate(R.layout.individual_view, container, false);
//db = new DatabaseHelper(appCtx);
// appCtx = (UnityMobileApp) getActivity().getApplication();
userImage = (ImageView)getView().findViewById(R.id.individualUserImage);
return view;
}
public void onPause(){
super.onPause();
}
public void onDestroy(){
super.onDestroy();
//doUnbindService();
//db.close();
}
public void onResume(){
super.onResume();
//personToDisplay = appCtx.getEveryone().get(username);
updateView();
//updateInfo();
}
private void updateView(){
userImage.setImageBitmap(personToDisplay.getRoundedImage(Consts.LARGE_USER_IMAGE_SIZE, Consts.LARGE_USER_IMAGE_BORDER));
}
}
And my Manifest file is below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fxpal.unity.android"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/unity_icon"
android:label="@string/app_name"
android:name=".UnityMobileApp"
android:theme="@android:style/Theme.Holo" android:logo="@drawable/fuji_xerox_logo_125">
<activity
android:label="@string/app_name"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".IndividualViewActivity"
android:label="@string/app_name" android:theme="@style/PageStyle">
</activity>
<service android:name=".ReportingService" />
<receiver android:name=".StartupReceiver"/>
</application>
</manifest>
Please help me. I am unable to find where the problem is.
Regards,
Rakesh
| 0 |
2,871,842 | 05/20/2010 07:45:00 | 345,824 | 05/20/2010 07:21:03 | 1 | 0 | How to transform a String into an object name selectedItem in the DataGrid? flex3 | I need to get the value of the item clicked and the name of the columns.
for each(item in colunas) {
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
}
**But this way it returns 'undefined'.**
But if I put the name already in function, I can get the correct data, example:
Alert.show(''+datagridlist.selectedItem.create); // create is a column name in mysql
But this variable must be created dynamically, example:
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
Could someone help me? I'm at it on time and I can not convert the string to column name.
I thank you all now
| flex | datagrid | selecteditem | null | null | null | open | How to transform a String into an object name selectedItem in the DataGrid? flex3
===
I need to get the value of the item clicked and the name of the columns.
for each(item in colunas) {
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
}
**But this way it returns 'undefined'.**
But if I put the name already in function, I can get the correct data, example:
Alert.show(''+datagridlist.selectedItem.create); // create is a column name in mysql
But this variable must be created dynamically, example:
var itemok:String = item.dataField;
Alert.show(''+datagridlist.selectedItem.itemok); // show value of column
Could someone help me? I'm at it on time and I can not convert the string to column name.
I thank you all now
| 0 |
8,732,947 | 01/04/2012 19:40:25 | 423,335 | 08/17/2010 21:12:51 | 149 | 4 | How to print a square using HTML? | How to print a square _precisely_ with 1 by 1 inch? | html | css | null | null | null | 01/04/2012 22:37:40 | not a real question | How to print a square using HTML?
===
How to print a square _precisely_ with 1 by 1 inch? | 1 |
6,665,893 | 07/12/2011 14:33:13 | 840,891 | 07/12/2011 14:06:56 | 1 | 0 | How to start celery in background of terminal in Django | I ma starting celery as
python manage.py celeryd
It is working but in foreground . Then to test commands i need to start another terminal and do stuff there.
is there any way to start that in background. I tried this
python manage.py celeryd &
But then again it comes at foreground
| django | django-celery | null | null | null | null | open | How to start celery in background of terminal in Django
===
I ma starting celery as
python manage.py celeryd
It is working but in foreground . Then to test commands i need to start another terminal and do stuff there.
is there any way to start that in background. I tried this
python manage.py celeryd &
But then again it comes at foreground
| 0 |
9,936,608 | 03/30/2012 03:25:09 | 1,225,432 | 02/22/2012 09:36:10 | 408 | 34 | Java -for loop only repeating last value | I have an Array to hold the value from DB. If I try with some default data it working fine but if I get value from DB, its only showing last value.
Default Data;
MenuList menu_data [] = new MenuList[]{};
menu_data = new MenuList[]
{
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1")
};
Value from DB,
MenuList menu_data [] = new MenuList[]{};
List<Menu> profiles = db.getAllContacts();
for (Menu cn : profiles) {
menu_data = new MenuList[]
{
new MenuList(cn.getmenuname(), cn.getmenuprice())
};
}
How do I get all the value from DB. | java | arrays | for-loop | null | null | null | open | Java -for loop only repeating last value
===
I have an Array to hold the value from DB. If I try with some default data it working fine but if I get value from DB, its only showing last value.
Default Data;
MenuList menu_data [] = new MenuList[]{};
menu_data = new MenuList[]
{
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1") ,
new MenuList("test","test1")
};
Value from DB,
MenuList menu_data [] = new MenuList[]{};
List<Menu> profiles = db.getAllContacts();
for (Menu cn : profiles) {
menu_data = new MenuList[]
{
new MenuList(cn.getmenuname(), cn.getmenuprice())
};
}
How do I get all the value from DB. | 0 |
6,369,973 | 06/16/2011 09:49:22 | 170,692 | 09/09/2009 08:59:14 | 964 | 44 | anyone knowing progress of asp.net mvc 4 | Is there anyone got a knowledge about asp.net mvc 4 roadmap and new features (not wishlist)? And will it be based on .net 4 or 5 ?
| .net | asp.net | asp.net-mvc | null | null | 06/16/2011 10:34:48 | not a real question | anyone knowing progress of asp.net mvc 4
===
Is there anyone got a knowledge about asp.net mvc 4 roadmap and new features (not wishlist)? And will it be based on .net 4 or 5 ?
| 1 |
8,601,864 | 12/22/2011 09:32:30 | 1,055,109 | 11/19/2011 08:46:48 | 6 | 0 | jquery - same function for all images to fade | I want to apply css to image-holder when I hover on it.
Below is my css
#thumbholder
{
height:30%;
width:100%;
}
.imagethumb
{
height:160px;
width:200px;
border:1px solid #707070;
padding:1%;
margin:0.6%;
}
Using jquery I want to get **border:1px solid #404040** border on **.imagethumb** when I place the cursor on it.
But now I get border on all images having class **.imagethumb**
Please help me to wriet a jquery function which lets individual images to get border when I place cursor on it.
Having unique id will solve this issue, but I want to try in other way. Please help me.
Thanks in advance
Ismail | jquery | css | null | null | null | null | open | jquery - same function for all images to fade
===
I want to apply css to image-holder when I hover on it.
Below is my css
#thumbholder
{
height:30%;
width:100%;
}
.imagethumb
{
height:160px;
width:200px;
border:1px solid #707070;
padding:1%;
margin:0.6%;
}
Using jquery I want to get **border:1px solid #404040** border on **.imagethumb** when I place the cursor on it.
But now I get border on all images having class **.imagethumb**
Please help me to wriet a jquery function which lets individual images to get border when I place cursor on it.
Having unique id will solve this issue, but I want to try in other way. Please help me.
Thanks in advance
Ismail | 0 |
361 | 08/02/2008 06:57:57 | 115 | 08/02/2008 05:44:40 | 1 | 1 | Generate list of all possible permiations. | How would I go about generateing a list of all possible permiations of a string between x and y characters in length. Containing a variable list of characters.<Br />
Any language would work but it should be portable.<br /> | string | generation | cross-platform | null | null | null | open | Generate list of all possible permiations.
===
How would I go about generateing a list of all possible permiations of a string between x and y characters in length. Containing a variable list of characters.<Br />
Any language would work but it should be portable.<br /> | 0 |
5,908,164 | 05/06/2011 07:31:51 | 741,282 | 05/06/2011 07:31:51 | 1 | 0 | Perform a Vlook Up or Find Per column. | Please help me,
Take for example i have a this kind of data set
In Sheet1
Column A
614545
546425
456426
In Sheet 4, I have a named table like this:
ColumnA | Column B | Column C
614545 | AAA | 1111
564645 | AXS | 1254
123545 | XSF | 4524
(And so forth...)
Now what i need is a code that would search For the corresponding Value of Sheet 1 Column A to the table in sheet 4. As for example, the code would give this result
Sheet1
Column A | Col B | COl C
614545 AAA CCC
(And so forth...)
I've been trying to solve this problem for weeks now. But I just couldnt fix it. I am onl able to perform a find function at one cell at a time. I need a code that would traverse to the whole column A (Sheet1) and would return the corresponding values on the table in sheet(4).
Please help me.
| excel-vba | null | null | null | null | null | open | Perform a Vlook Up or Find Per column.
===
Please help me,
Take for example i have a this kind of data set
In Sheet1
Column A
614545
546425
456426
In Sheet 4, I have a named table like this:
ColumnA | Column B | Column C
614545 | AAA | 1111
564645 | AXS | 1254
123545 | XSF | 4524
(And so forth...)
Now what i need is a code that would search For the corresponding Value of Sheet 1 Column A to the table in sheet 4. As for example, the code would give this result
Sheet1
Column A | Col B | COl C
614545 AAA CCC
(And so forth...)
I've been trying to solve this problem for weeks now. But I just couldnt fix it. I am onl able to perform a find function at one cell at a time. I need a code that would traverse to the whole column A (Sheet1) and would return the corresponding values on the table in sheet(4).
Please help me.
| 0 |
230,527 | 10/23/2008 16:58:51 | 22,088 | 09/25/2008 10:32:58 | 718 | 21 | Telling bugs and features apart? | Have you ever been in the situation when looking at the code you couldn’t tell if something is a bug or poorly implemented feature? Or you simply didn’t dare to fix something that looked like a definite bug to you, but were not sure if anyone already relies on the functionality behaving in a certain way?
What are your best heuristics for telling bugs and features apart? Any good stories?
| discussion | quality | refactoring | debugging | null | 04/05/2012 13:21:01 | not constructive | Telling bugs and features apart?
===
Have you ever been in the situation when looking at the code you couldn’t tell if something is a bug or poorly implemented feature? Or you simply didn’t dare to fix something that looked like a definite bug to you, but were not sure if anyone already relies on the functionality behaving in a certain way?
What are your best heuristics for telling bugs and features apart? Any good stories?
| 4 |
2,888,035 | 05/22/2010 12:18:01 | 180,960 | 09/29/2009 07:47:44 | 27 | 5 | information hiding in python | in python tutorial added that python cannot hide its attributes from other classes. some thing such as private data in C++ or java..But also i know that we can use _ or __ to set some variables as privated one but it is not enogh. I think it is a week if it is not any thing to do it. | python | null | null | null | null | 05/22/2010 20:07:39 | not a real question | information hiding in python
===
in python tutorial added that python cannot hide its attributes from other classes. some thing such as private data in C++ or java..But also i know that we can use _ or __ to set some variables as privated one but it is not enogh. I think it is a week if it is not any thing to do it. | 1 |
11,119,643 | 06/20/2012 12:33:08 | 1,448,316 | 06/11/2012 06:52:45 | 1 | 0 | Writing a string to textfile in Android | How Can I write a String to a text file,I should be able to specify the location of the file(or some how open and see its content,It is not necessary that it should be located in Computers memory), please provide me with the code snippet.
Thank you in advance for all the responses. | android | null | null | null | null | 06/20/2012 12:53:32 | not a real question | Writing a string to textfile in Android
===
How Can I write a String to a text file,I should be able to specify the location of the file(or some how open and see its content,It is not necessary that it should be located in Computers memory), please provide me with the code snippet.
Thank you in advance for all the responses. | 1 |
8,554,559 | 12/18/2011 20:27:16 | 1,091,534 | 12/10/2011 18:33:52 | 11 | 0 | SWT Java placing/receiving stuff from clipboard | I am trying to write some strings to the clipboard in my Eclipse plugin and I have some strange behavior ...
I am using the predefined TextTransfer Transfer-class which should be sufficient for strings?!
My Problem is, that regardless of the number of strings I put in the clipboard only the very last is actually accessible afterwards - I cannot figure out why.
Placing my stuff in the clipboard seems to work, no exceptions. I doing it this way:
Clipboard cb = new Clipboard(Display.getCurrent());
Object[] data = transferObjects.toArray(); //My strings, looks good in debug
Transfer[] transfer = transferHandles.toArray(new Transfer[0]); //as many TextTransfer instances as objects in the data-array
cb.setContents(data, transfer, DND.CLIPBOARD);
cb.dispose();
I receive it this way:
TextTransfer textTransfer = TextTransfer.getInstance();
Object o = cb.getContents(textTransfer); // "o" contains the value of the above array at position n-1, so only the very last is actually returned
I don't get what I am doing wrong? Does anyone see my error? | eclipse | swt | clipboard | null | null | null | open | SWT Java placing/receiving stuff from clipboard
===
I am trying to write some strings to the clipboard in my Eclipse plugin and I have some strange behavior ...
I am using the predefined TextTransfer Transfer-class which should be sufficient for strings?!
My Problem is, that regardless of the number of strings I put in the clipboard only the very last is actually accessible afterwards - I cannot figure out why.
Placing my stuff in the clipboard seems to work, no exceptions. I doing it this way:
Clipboard cb = new Clipboard(Display.getCurrent());
Object[] data = transferObjects.toArray(); //My strings, looks good in debug
Transfer[] transfer = transferHandles.toArray(new Transfer[0]); //as many TextTransfer instances as objects in the data-array
cb.setContents(data, transfer, DND.CLIPBOARD);
cb.dispose();
I receive it this way:
TextTransfer textTransfer = TextTransfer.getInstance();
Object o = cb.getContents(textTransfer); // "o" contains the value of the above array at position n-1, so only the very last is actually returned
I don't get what I am doing wrong? Does anyone see my error? | 0 |
3,955,631 | 10/17/2010 22:42:53 | 479,112 | 10/17/2010 22:42:53 | 1 | 0 | PHP / SQL Using data from previous query to query another table | I've been trying to work this our for a while, but having trouble.
We have 4 tables consiting of, suppliers, supplier_areas, supplier_languages and supplier_products options.
I am trying to make an advanced search where users can search members using any of the above.
An example search may be all suppliers in a certain area that speak english & french and also sell products 1 and 2.
I know the locations table will always have to be queried first, followed by the languages, then the products table, and finally by specific fields out of the suppliers table.
E.g.
All supplierid's from supplier_areas where locationid = 1
This for example returns an array with the supplierids '1', '5', '10'
I then need to query the languages table to find out which of these suppliers speak english which the only statement I could see using is
SELECT supplierid from supplier_languages WHERE languageid = 1 OR languageid = 2 AND supplierid = 1 OR supplierid = 5 OR supplierid = 10
Then obviously use the result from taht to query the final two tables.
I'm assuming the OR statement that i'm planning on doing will be too slow and server intensive. The results returned from the first query could be anything upto 200+ supplier ids.
Any help would be appreciated.
Thanks | php | mysql | multidimensional-array | null | null | null | open | PHP / SQL Using data from previous query to query another table
===
I've been trying to work this our for a while, but having trouble.
We have 4 tables consiting of, suppliers, supplier_areas, supplier_languages and supplier_products options.
I am trying to make an advanced search where users can search members using any of the above.
An example search may be all suppliers in a certain area that speak english & french and also sell products 1 and 2.
I know the locations table will always have to be queried first, followed by the languages, then the products table, and finally by specific fields out of the suppliers table.
E.g.
All supplierid's from supplier_areas where locationid = 1
This for example returns an array with the supplierids '1', '5', '10'
I then need to query the languages table to find out which of these suppliers speak english which the only statement I could see using is
SELECT supplierid from supplier_languages WHERE languageid = 1 OR languageid = 2 AND supplierid = 1 OR supplierid = 5 OR supplierid = 10
Then obviously use the result from taht to query the final two tables.
I'm assuming the OR statement that i'm planning on doing will be too slow and server intensive. The results returned from the first query could be anything upto 200+ supplier ids.
Any help would be appreciated.
Thanks | 0 |
9,366,571 | 02/20/2012 18:39:00 | 505,392 | 11/12/2010 06:07:30 | 98 | 0 | xcode print view tutorial? | I want to make an iPad application presenting a view containing some UiTextFields, that I can change values at run time, then printing all the view - with the background image.
Sorry if that question was already answered but I didn't get the solution since I've never worked before with printing in IOS.
Thank you for any guide lines or tutorials.
| ios | xcode | ipad | printing | null | 02/21/2012 19:04:15 | not a real question | xcode print view tutorial?
===
I want to make an iPad application presenting a view containing some UiTextFields, that I can change values at run time, then printing all the view - with the background image.
Sorry if that question was already answered but I didn't get the solution since I've never worked before with printing in IOS.
Thank you for any guide lines or tutorials.
| 1 |
5,866,724 | 05/03/2011 08:01:25 | 735,712 | 05/03/2011 08:01:25 | 1 | 0 | Filemaker Developer rights | i have question for the filemaker if i create filemaker runtime application can i sell that runtime on my website and if i can, how i pay taxes for any profit i have any law rights | filemaker | law | null | null | null | 05/03/2011 10:55:22 | off topic | Filemaker Developer rights
===
i have question for the filemaker if i create filemaker runtime application can i sell that runtime on my website and if i can, how i pay taxes for any profit i have any law rights | 2 |
3,309,512 | 07/22/2010 13:48:45 | 81,000 | 03/22/2009 03:28:04 | 876 | 62 | What are some good graphics programming interview questions? | What are some good graphics programming interview questions? These could be math questions, OpenGL questions, DirectX questions, shader questions, etc. | opengl | opengl-es | interview-questions | directx | graphics-programming | 11/30/2011 03:17:29 | not constructive | What are some good graphics programming interview questions?
===
What are some good graphics programming interview questions? These could be math questions, OpenGL questions, DirectX questions, shader questions, etc. | 4 |
6,908,171 | 08/02/2011 06:38:57 | 161,735 | 08/23/2009 22:59:10 | 494 | 11 | Jquery: calculating width of hidden input | Pretty simple task: using jquery I need to calculate the width of an input before the input is visible on the screen.
http://jsfiddle.net/ajbeaven/mKQx9/
Here is the code for convenience:
<div style="display:none;">
<input />
</div>
<script type="text/javascript">
$(function () {
alert($('input').width());
$('div').show();
});
</script>
Alert always shows `0`
How do I calculate width without having to forcibly make the element visible, calculate the width, then hide them again? | javascript | jquery | null | null | null | null | open | Jquery: calculating width of hidden input
===
Pretty simple task: using jquery I need to calculate the width of an input before the input is visible on the screen.
http://jsfiddle.net/ajbeaven/mKQx9/
Here is the code for convenience:
<div style="display:none;">
<input />
</div>
<script type="text/javascript">
$(function () {
alert($('input').width());
$('div').show();
});
</script>
Alert always shows `0`
How do I calculate width without having to forcibly make the element visible, calculate the width, then hide them again? | 0 |
2,517,587 | 03/25/2010 16:54:00 | 299 | 08/04/2008 13:31:09 | 1,266 | 33 | ASP.NET MVC - Refresh PartialView when DropDownList changed | I have a search form that is an Ajax form. Within the form is a DropDownList that, when changed, should refresh a PartialView within the Ajax form (via a GET request). However, I'm not sure what to do in order to refresh the PartialView after I get back my results via the GET request.
Here's what my view currently looks like:
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Search
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
$(document).ready(function () {
$("#Sections").change(function () {
var section = $("#Sections").val();
var township = $("#Townships").val();
var range = $("#Ranges").val();
$.ajax({
type: "GET",
url: "Search/Search?section=" + section + "&township=" + township + "&range=" + range,
contentType: "application/json; charset=utf-8",
dataType: "html",
success: function (result) {
// What should I do here to refresh PartialView?
}
});
});
});
</script>
<h2>Search</h2>
<%--The line below is a workaround for a VB / ASPX designer bug--%>
<%=""%>
<% Using Ajax.BeginForm("Search", New AjaxOptions With {.UpdateTargetId = "searchResults", .LoadingElementId = "loader"})%>
Township <%= Html.DropDownList("Townships")%>
Range <%= Html.DropDownList("Ranges")%>
Section <%= Html.DropDownList("Sections")%>
<% Html.RenderPartial("Corners")%>
<input type="submit" value="Search" />
<span id="loader">Searching...</span>
<% End Using%>
<div id="searchResults"></div>
</asp:Content>
| asp.net-mvc-2 | jquery | partialview | ajax | null | null | open | ASP.NET MVC - Refresh PartialView when DropDownList changed
===
I have a search form that is an Ajax form. Within the form is a DropDownList that, when changed, should refresh a PartialView within the Ajax form (via a GET request). However, I'm not sure what to do in order to refresh the PartialView after I get back my results via the GET request.
Here's what my view currently looks like:
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Search
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
$(document).ready(function () {
$("#Sections").change(function () {
var section = $("#Sections").val();
var township = $("#Townships").val();
var range = $("#Ranges").val();
$.ajax({
type: "GET",
url: "Search/Search?section=" + section + "&township=" + township + "&range=" + range,
contentType: "application/json; charset=utf-8",
dataType: "html",
success: function (result) {
// What should I do here to refresh PartialView?
}
});
});
});
</script>
<h2>Search</h2>
<%--The line below is a workaround for a VB / ASPX designer bug--%>
<%=""%>
<% Using Ajax.BeginForm("Search", New AjaxOptions With {.UpdateTargetId = "searchResults", .LoadingElementId = "loader"})%>
Township <%= Html.DropDownList("Townships")%>
Range <%= Html.DropDownList("Ranges")%>
Section <%= Html.DropDownList("Sections")%>
<% Html.RenderPartial("Corners")%>
<input type="submit" value="Search" />
<span id="loader">Searching...</span>
<% End Using%>
<div id="searchResults"></div>
</asp:Content>
| 0 |
4,216,298 | 11/18/2010 15:13:53 | 247,707 | 01/11/2010 00:29:39 | 29 | 0 | Partial data sets in R | We are looking to train R with structures like:
age, data1, data2, ... dataN, actions
where N depends on the amount of data we have about a person.
Our goal is to determine how likely is it that another person would generate actions by querying on all the data we have him/her.
age, data1, data2, ...dataM where M could be bigger or smaller than N.
With complete data-sets we could have used binary logistic regression. But we need to use partial sets. | r | statistics | null | null | null | 11/18/2010 19:11:57 | not a real question | Partial data sets in R
===
We are looking to train R with structures like:
age, data1, data2, ... dataN, actions
where N depends on the amount of data we have about a person.
Our goal is to determine how likely is it that another person would generate actions by querying on all the data we have him/her.
age, data1, data2, ...dataM where M could be bigger or smaller than N.
With complete data-sets we could have used binary logistic regression. But we need to use partial sets. | 1 |
10,924,397 | 06/07/2012 01:06:07 | 1,441,097 | 06/07/2012 01:00:30 | 1 | 0 | How to use a variable from a function to the main in python? | I have a function that draws a shape and records one of the positions of the points. Let's say that point is (2,1) so x = (2,1)
How do I use x in my main?
def shape():
t.forward(10)
x = t.position()
t.goto(x)
How can I make that work?
| python | function | null | null | null | null | open | How to use a variable from a function to the main in python?
===
I have a function that draws a shape and records one of the positions of the points. Let's say that point is (2,1) so x = (2,1)
How do I use x in my main?
def shape():
t.forward(10)
x = t.position()
t.goto(x)
How can I make that work?
| 0 |
10,690,067 | 05/21/2012 17:49:00 | 196,919 | 10/26/2009 21:39:42 | 2,067 | 136 | How to use user permissions with Facebook C# SDK | Does someone know how we can use [permissions][1] with [Facebook C# SDK][2]?
I mean to pass a list of permissions via Facebook C# SDK?
Thank you!
[1]: https://developers.facebook.com/docs/authentication/permissions/
[2]: http://csharpsdk.org/ | c# | .net | facebook | facebook-graph-api | null | null | open | How to use user permissions with Facebook C# SDK
===
Does someone know how we can use [permissions][1] with [Facebook C# SDK][2]?
I mean to pass a list of permissions via Facebook C# SDK?
Thank you!
[1]: https://developers.facebook.com/docs/authentication/permissions/
[2]: http://csharpsdk.org/ | 0 |
2,284,101 | 02/17/2010 20:23:12 | 180,813 | 09/29/2009 00:44:45 | 22 | 2 | Debugging Windows sidebar gadgets without Visual Studio | I'm trying to create a sidebar gadget without the use of Visual Studio. I've looked around for ways to debug them, but everything says that the Visual Studio JIT debugger is the only way to do it.
Has anyone been able to debug sidebar gadgets without Visual Studio? | windows-desktop-gadgets | null | null | null | null | null | open | Debugging Windows sidebar gadgets without Visual Studio
===
I'm trying to create a sidebar gadget without the use of Visual Studio. I've looked around for ways to debug them, but everything says that the Visual Studio JIT debugger is the only way to do it.
Has anyone been able to debug sidebar gadgets without Visual Studio? | 0 |
2,915,197 | 05/26/2010 17:10:04 | 59,314 | 01/27/2009 12:23:27 | 309 | 24 | Creating dynamic text for a literal control | On the ListView1_ItemDataBound of a list view event, i create the literal.text like so...
<span style="position:relative;">
<span id="term1" class="popup">This is the answer!</span>
<a href="javascript:void(0);"onMouseover="ShowPop('term1');" onMouseout="HidePop('term1');">Show me the answer</a></span>
The problem is that the text is not rendered as it should. *On mousing over* the literal control the url is
http://localhost:1391/"javascript:void(0);"onMouseover="ShowPop('term1');"
So what is going on here? What am i missing?
| asp.net | html | dynamic | literals | null | null | open | Creating dynamic text for a literal control
===
On the ListView1_ItemDataBound of a list view event, i create the literal.text like so...
<span style="position:relative;">
<span id="term1" class="popup">This is the answer!</span>
<a href="javascript:void(0);"onMouseover="ShowPop('term1');" onMouseout="HidePop('term1');">Show me the answer</a></span>
The problem is that the text is not rendered as it should. *On mousing over* the literal control the url is
http://localhost:1391/"javascript:void(0);"onMouseover="ShowPop('term1');"
So what is going on here? What am i missing?
| 0 |
8,914,189 | 01/18/2012 17:04:25 | 779,526 | 06/01/2011 13:53:03 | 71 | 0 | For loop with -1 Step | I am converting some VBA code into Python and I came across the following loop which steps -1
For k = i - 1 To 1 Step -1
What is the equivalent of a -1 Step in Python? | python | for-loop | null | null | null | 01/21/2012 16:41:29 | too localized | For loop with -1 Step
===
I am converting some VBA code into Python and I came across the following loop which steps -1
For k = i - 1 To 1 Step -1
What is the equivalent of a -1 Step in Python? | 3 |
2,456,324 | 03/16/2010 16:46:39 | 9,330 | 09/15/2008 18:26:39 | 268 | 4 | Mapping US zip code to time zone | When users register with our app, we are able to infer their zip code when we validate them against a national database. What would be the best way to determine a good potential guess of their time zone from this zip code?
We are trying to minimize the amount of data we explicitly have to ask them for. They will be able to manually set the time zone later if our best guess is wrong. I realize zip codes won't help with figuring out the time zone outside the US, but in that case we'd have to manually ask anyway, and we deal predominantly with the US regardless.
I've found a lot of zip code databases, and so far only a few contain time zone information, but those that do are not free, such as [this one](http://www.zipinfo.com/products/z5p/z5p.htm). If it's absolutely necessary to pay a subscription to a service in order to do this, then it will not be worth it and we will just have to ask users explicitly.
Although language isn't particularly relevant as I can probably convert things however needed, we're using PHP and MySQL. | zipcode | timezone | null | null | null | null | open | Mapping US zip code to time zone
===
When users register with our app, we are able to infer their zip code when we validate them against a national database. What would be the best way to determine a good potential guess of their time zone from this zip code?
We are trying to minimize the amount of data we explicitly have to ask them for. They will be able to manually set the time zone later if our best guess is wrong. I realize zip codes won't help with figuring out the time zone outside the US, but in that case we'd have to manually ask anyway, and we deal predominantly with the US regardless.
I've found a lot of zip code databases, and so far only a few contain time zone information, but those that do are not free, such as [this one](http://www.zipinfo.com/products/z5p/z5p.htm). If it's absolutely necessary to pay a subscription to a service in order to do this, then it will not be worth it and we will just have to ask users explicitly.
Although language isn't particularly relevant as I can probably convert things however needed, we're using PHP and MySQL. | 0 |
2,810,352 | 05/11/2010 11:49:15 | 227,932 | 12/09/2009 11:48:30 | 1 | 0 | Basic shared memory program in C | I want to make a basic chat application in C using Shared memory. I am working in Linux. The application consist in writing the client and the server can read, and if the server write the client can read the message.
I tried to do this, but I can't achieve the communication between client and server. The code is the following:
Server.c
int
main(int argc, char **argv)
{
char *msg;
static char buf[SIZE];
int n;
msg = getmem();
memset(msg, 0, SIZE);
initmutex();
while ( true )
{
if( (n = read(0, buf, sizeof buf)) > 0 )
{
enter();
sprintf(msg, "%.*s", n, buf);
printf("Servidor escribe: %s", msg);
leave();
}else{
enter();
if ( strcmp(buf, msg) )
{
printf("Servidor lee: %s", msg);
strcpy(buf, msg);
}
leave();
sleep(1);
}
}
return 0;
}
------------------------------------
Client.c
int
main(int argc, char **argv)
{
char *msg;
static char buf[SIZE-1];
int n;
msg = getmem();
initmutex();
while(true)
{
if ( (n = read(0, buf, sizeof buf)) > 0 )
{
enter();
sprintf(msg, "%.*s", n, buf);
printf("Cliente escribe: %s", msg);
leave();
}else{
enter();
if ( strcmp(buf, msg) )
{
printf("Cliente lee: %s", msg);
strcpy(buf, msg);
}
leave();
sleep(1);
}
}
printf("Cliente termina\n");
return 0;
}
--------------------
The shared memory module is the folowing:
#include "common.h"
void
fatal(char *s)
{
perror(s);
exit(1);
}
char *
getmem(void)
{
int fd;
char *mem;
if ( (fd = shm_open("/message", O_RDWR|O_CREAT, 0666)) == -1 )
fatal("sh_open");
ftruncate(fd, SIZE);
if ( !(mem = mmap(NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) )
fatal("mmap");
close(fd);
return mem;
}
static sem_t *sd;
void
initmutex(void)
{
if ( !(sd = sem_open("/mutex", O_RDWR|O_CREAT, 0666, 1)) )
fatal("sem_open");
}
void
enter(void)
{
sem_wait(sd);
}
void
leave(void)
{
sem_post(sd);
}
| shared-memory | in | c | null | null | null | open | Basic shared memory program in C
===
I want to make a basic chat application in C using Shared memory. I am working in Linux. The application consist in writing the client and the server can read, and if the server write the client can read the message.
I tried to do this, but I can't achieve the communication between client and server. The code is the following:
Server.c
int
main(int argc, char **argv)
{
char *msg;
static char buf[SIZE];
int n;
msg = getmem();
memset(msg, 0, SIZE);
initmutex();
while ( true )
{
if( (n = read(0, buf, sizeof buf)) > 0 )
{
enter();
sprintf(msg, "%.*s", n, buf);
printf("Servidor escribe: %s", msg);
leave();
}else{
enter();
if ( strcmp(buf, msg) )
{
printf("Servidor lee: %s", msg);
strcpy(buf, msg);
}
leave();
sleep(1);
}
}
return 0;
}
------------------------------------
Client.c
int
main(int argc, char **argv)
{
char *msg;
static char buf[SIZE-1];
int n;
msg = getmem();
initmutex();
while(true)
{
if ( (n = read(0, buf, sizeof buf)) > 0 )
{
enter();
sprintf(msg, "%.*s", n, buf);
printf("Cliente escribe: %s", msg);
leave();
}else{
enter();
if ( strcmp(buf, msg) )
{
printf("Cliente lee: %s", msg);
strcpy(buf, msg);
}
leave();
sleep(1);
}
}
printf("Cliente termina\n");
return 0;
}
--------------------
The shared memory module is the folowing:
#include "common.h"
void
fatal(char *s)
{
perror(s);
exit(1);
}
char *
getmem(void)
{
int fd;
char *mem;
if ( (fd = shm_open("/message", O_RDWR|O_CREAT, 0666)) == -1 )
fatal("sh_open");
ftruncate(fd, SIZE);
if ( !(mem = mmap(NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) )
fatal("mmap");
close(fd);
return mem;
}
static sem_t *sd;
void
initmutex(void)
{
if ( !(sd = sem_open("/mutex", O_RDWR|O_CREAT, 0666, 1)) )
fatal("sem_open");
}
void
enter(void)
{
sem_wait(sd);
}
void
leave(void)
{
sem_post(sd);
}
| 0 |
9,413,726 | 02/23/2012 13:09:08 | 1,201,989 | 02/10/2012 12:09:02 | 24 | 0 | Why application is crashing during calling next activity in nadroid? | Can any one suggest me, Why my application is crashing when calling next activity? I am having default frame animation in both activity which is running inside onWindowFocuschanged() method..is there any solution to run it smoothly. | android | null | null | null | null | 02/23/2012 16:34:10 | not a real question | Why application is crashing during calling next activity in nadroid?
===
Can any one suggest me, Why my application is crashing when calling next activity? I am having default frame animation in both activity which is running inside onWindowFocuschanged() method..is there any solution to run it smoothly. | 1 |
5,939,745 | 05/09/2011 16:27:05 | 610,545 | 02/09/2011 22:41:34 | 33 | 0 | Data mining: learning by example | I just finished my grad degree and while waiting to continue school I am thinking of doing a data mining project that will help me to learn the concepts. I am looking for some suggestinons on:
- what language is the best (I know some python, some R, C++, and pretty fluent in mysql, matlab)
- where is the most optimal place to start (literature, online lectures,..)
- any suggestions about meaningful project?
Thank you in advance.
| data-mining | advice | null | null | null | 05/09/2011 18:06:31 | too localized | Data mining: learning by example
===
I just finished my grad degree and while waiting to continue school I am thinking of doing a data mining project that will help me to learn the concepts. I am looking for some suggestinons on:
- what language is the best (I know some python, some R, C++, and pretty fluent in mysql, matlab)
- where is the most optimal place to start (literature, online lectures,..)
- any suggestions about meaningful project?
Thank you in advance.
| 3 |
2,288,904 | 02/18/2010 13:34:47 | 240,181 | 12/29/2009 13:03:36 | 6 | 0 | How can I show image file from Amazon S3 in asp.net mvc? | I need to show image(thumbnail) in view page using controller/action.(like: /Image/Thumbnail)
I can send image file that is stored locally by calling the method in controller.
// sample code
public FileResult Thumbnail()
{
// get image
Stream outFile = System.IO.File.Open("c:\\test.jpg", FileMode.Open);
// send image
return File(outFile, "image/jpeg");
}
How can I send image file that is stored in Amazon S3 ?
Can I use Amazon S3 URL in the above method to return image ? -->
<http://bucketname.s3.amazonaws.com/test.jpg?AWSAccessKeyId=AKIAIDLH65EJ6LSWERDF&Expires=1266497098&Signature=lopDEDErjNLy2uz6X6QCNlIjkpB0%3D>
Thanks | amazon | amazon-s3 | asp.net | mvc | null | null | open | How can I show image file from Amazon S3 in asp.net mvc?
===
I need to show image(thumbnail) in view page using controller/action.(like: /Image/Thumbnail)
I can send image file that is stored locally by calling the method in controller.
// sample code
public FileResult Thumbnail()
{
// get image
Stream outFile = System.IO.File.Open("c:\\test.jpg", FileMode.Open);
// send image
return File(outFile, "image/jpeg");
}
How can I send image file that is stored in Amazon S3 ?
Can I use Amazon S3 URL in the above method to return image ? -->
<http://bucketname.s3.amazonaws.com/test.jpg?AWSAccessKeyId=AKIAIDLH65EJ6LSWERDF&Expires=1266497098&Signature=lopDEDErjNLy2uz6X6QCNlIjkpB0%3D>
Thanks | 0 |
2,224,611 | 02/08/2010 20:25:11 | 236,468 | 12/22/2009 00:17:46 | 28 | 1 | ASP.net DropDownList with no selected item. | I have a ASP DropDownList with item added to it. all what I want is to make the selection after the page loaded empty so there should not be selected item.
How can I do that. | asp.net-3.5 | drop-down-menu | null | null | null | null | open | ASP.net DropDownList with no selected item.
===
I have a ASP DropDownList with item added to it. all what I want is to make the selection after the page loaded empty so there should not be selected item.
How can I do that. | 0 |
11,438,615 | 07/11/2012 17:58:52 | 1,518,592 | 07/11/2012 17:34:31 | 1 | 0 | how to generate an admin CRUD module in an existing symphony project | I'm going nuts with this legacy project. It was developed with the Symphony PHP framework and i never worked with it before. Seems to me that the only way to do things is using the CLI tool. But the tools work generally with all the application.
The Symphony project is organized like the following:
- root directory
- apps directory
- and all other common directories in a Symphony project
The apps directory contains two more directories: "cms" and "site".
I want to build just ONE admin module, a CRUD, into the "cms" app.
The "cms" directory is the admin part of the application. Can you guys give me a hand to do this?
Thanks!! | php | doctrine | symphony-cms | null | null | null | open | how to generate an admin CRUD module in an existing symphony project
===
I'm going nuts with this legacy project. It was developed with the Symphony PHP framework and i never worked with it before. Seems to me that the only way to do things is using the CLI tool. But the tools work generally with all the application.
The Symphony project is organized like the following:
- root directory
- apps directory
- and all other common directories in a Symphony project
The apps directory contains two more directories: "cms" and "site".
I want to build just ONE admin module, a CRUD, into the "cms" app.
The "cms" directory is the admin part of the application. Can you guys give me a hand to do this?
Thanks!! | 0 |
7,057,077 | 08/14/2011 13:31:22 | 855,921 | 07/21/2011 12:31:43 | 62 | 0 | Probability of winning a game of dart | I found an interesting [programming problem](http://judge.gepwnage.nl/user/problem.php?id=100) on probability. 2 drunk dart players are playing a game similar to 501. They start with N points. Player A throws the darts at random (each section is equally likely to be hit). Player B aims at the best section (the dart has the same probability of landing in the correct one as in each of the two adjacent ones). They ask the probability of each player winning when they can throw first. The full description of the problem can be read by following the above link.
I have a basic understanding of probability but I can't wrap my head around this.
Player B will aim at the 20 as long his score is 20 or higher. So it would be possible to calculate the probability of each player being at score *x* after *n* throws. But could someone explain how to determine the probability of winning.
| math | programming-languages | probability | problem-solving | acm-icpc | 08/14/2011 15:28:34 | off topic | Probability of winning a game of dart
===
I found an interesting [programming problem](http://judge.gepwnage.nl/user/problem.php?id=100) on probability. 2 drunk dart players are playing a game similar to 501. They start with N points. Player A throws the darts at random (each section is equally likely to be hit). Player B aims at the best section (the dart has the same probability of landing in the correct one as in each of the two adjacent ones). They ask the probability of each player winning when they can throw first. The full description of the problem can be read by following the above link.
I have a basic understanding of probability but I can't wrap my head around this.
Player B will aim at the 20 as long his score is 20 or higher. So it would be possible to calculate the probability of each player being at score *x* after *n* throws. But could someone explain how to determine the probability of winning.
| 2 |
2,318,475 | 02/23/2010 13:36:33 | 258 | 08/04/2008 07:59:04 | 353 | 21 | Why can't I reference child entities with part of the parent entities composite key | I am trying to reference some child entities with part of the parents composite key not all of it, why cant I? This happens when I use the following mapping instead of that which is commented.
I get the following error
> Foreign key in table
> VolatileEventContent must have same
> number of columns as referenced
> primary key in table
> LocationSearchView
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="JeanieMaster.Domain.Entities" assembly="JeanieMaster.Domain">
<class name="LocationSearchView" table="LocationSearchView">
<composite-id>
<key-property name="LocationId" type="Int32"></key-property>
<key-property name="ContentProviderId" type="Int32"></key-property>
<key-property name="CategoryId" type="Int32"></key-property>
</composite-id>
<property name="CompanyName" type="String" not-null="true" update="false" insert="false"/>
<property name="Description" type="String" not-null="true" update="false" insert="false"/>
<property name="CategoryId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="ContentProviderId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="LocationId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="Latitude" type="Double" update="false" insert="false" />
<property name="Longitude" type="Double" update="false" insert="false" />
<bag name="Events" table="VolatileEventContent" where="DeactivatedOn IS NULL" order-by="StartDate DESC" lazy="false" cascade="none">
<key column="LocationId">
<!--<column name="LocationId"></column>
<column name="ContentProviderId"></column>
<column name="CategoryId"></column>-->
</key>
<many-to-many class="Event" column="VolatileEventContentId"></many-to-many>
</bag>
</class>
</hibernate-mapping>
| nhibernate | hibernate | c# | null | null | null | open | Why can't I reference child entities with part of the parent entities composite key
===
I am trying to reference some child entities with part of the parents composite key not all of it, why cant I? This happens when I use the following mapping instead of that which is commented.
I get the following error
> Foreign key in table
> VolatileEventContent must have same
> number of columns as referenced
> primary key in table
> LocationSearchView
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="JeanieMaster.Domain.Entities" assembly="JeanieMaster.Domain">
<class name="LocationSearchView" table="LocationSearchView">
<composite-id>
<key-property name="LocationId" type="Int32"></key-property>
<key-property name="ContentProviderId" type="Int32"></key-property>
<key-property name="CategoryId" type="Int32"></key-property>
</composite-id>
<property name="CompanyName" type="String" not-null="true" update="false" insert="false"/>
<property name="Description" type="String" not-null="true" update="false" insert="false"/>
<property name="CategoryId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="ContentProviderId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="LocationId" type="Int32" not-null="true" update="false" insert="false"/>
<property name="Latitude" type="Double" update="false" insert="false" />
<property name="Longitude" type="Double" update="false" insert="false" />
<bag name="Events" table="VolatileEventContent" where="DeactivatedOn IS NULL" order-by="StartDate DESC" lazy="false" cascade="none">
<key column="LocationId">
<!--<column name="LocationId"></column>
<column name="ContentProviderId"></column>
<column name="CategoryId"></column>-->
</key>
<many-to-many class="Event" column="VolatileEventContentId"></many-to-many>
</bag>
</class>
</hibernate-mapping>
| 0 |
1,519,693 | 10/05/2009 12:07:29 | 184,336 | 10/05/2009 12:07:29 | 1 | 0 | What is the best Java SIP Stack around ? | What is the best Java SIP Stack I can use.
I'm looking for Stable, Efficient, Rich Feature-Set, Stable & Bug-less :)
Thanks !
| sip | null | null | null | null | 09/10/2011 19:07:09 | off topic | What is the best Java SIP Stack around ?
===
What is the best Java SIP Stack I can use.
I'm looking for Stable, Efficient, Rich Feature-Set, Stable & Bug-less :)
Thanks !
| 2 |
10,377,001 | 04/29/2012 23:45:34 | 501,017 | 11/08/2010 18:32:10 | 1 | 1 | Hash navigation; Either animate transitions with CSS3 or disable CSS3 hashtag navigation and use jQuery. But how? | Both CSS3 and jQuery can implement hash link navigation. But I cannot get the transition to be animated with CSS3. And I can't turn the CSS3 hash link fallowing off on browsers that support it resulting in both jQuery and CSS3 wanting to do the movement and CSS3 winning 9 times out of ten.
In this first jsfiddle is somewhat what I want my page to look like, navigation is done automatically by the browser:
http://jsfiddle.net/mg7Bw/2/
This second jsfiddle contains the same page but with jQuery loaded along with a simple script that is supposed to do do some fancy animation when the links are pressed, but is too slow most of the times. But if you click enough times you will see the animation once or twice.
http://jsfiddle.net/XHSyV/
Doing the transitions in jQuery or CSS3 has their advantages and disadvantages. Mostly I would like to have both. If the browser can do CSS3 transitions, send way less code. If the browser can't, send jQuery-code. But most of all I just want one method that works well. | jquery | css3 | transitions | hashtag | null | null | open | Hash navigation; Either animate transitions with CSS3 or disable CSS3 hashtag navigation and use jQuery. But how?
===
Both CSS3 and jQuery can implement hash link navigation. But I cannot get the transition to be animated with CSS3. And I can't turn the CSS3 hash link fallowing off on browsers that support it resulting in both jQuery and CSS3 wanting to do the movement and CSS3 winning 9 times out of ten.
In this first jsfiddle is somewhat what I want my page to look like, navigation is done automatically by the browser:
http://jsfiddle.net/mg7Bw/2/
This second jsfiddle contains the same page but with jQuery loaded along with a simple script that is supposed to do do some fancy animation when the links are pressed, but is too slow most of the times. But if you click enough times you will see the animation once or twice.
http://jsfiddle.net/XHSyV/
Doing the transitions in jQuery or CSS3 has their advantages and disadvantages. Mostly I would like to have both. If the browser can do CSS3 transitions, send way less code. If the browser can't, send jQuery-code. But most of all I just want one method that works well. | 0 |
4,162,018 | 11/12/2010 05:55:24 | 273,340 | 02/15/2010 08:43:15 | 196 | 15 | Where can I download a free C# 4.0 good book? | I want to download free C# 4.0 book for free.
Any suggestions?
Thank you | c# | .net | books | c#-4.0 | null | 07/07/2012 15:53:20 | off topic | Where can I download a free C# 4.0 good book?
===
I want to download free C# 4.0 book for free.
Any suggestions?
Thank you | 2 |
10,972,467 | 06/10/2012 21:22:31 | 1,413,871 | 05/24/2012 00:44:04 | 20 | 0 | How to combine this arrays PHP | This three arrays below I want to combine and I don't know how to do that, I want to take the `companyCode` of each array and make it for one array.
I have an array like this,
Array(
[0] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'ECAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '295.62'
)
);
[1] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'SCAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '356.25'
)
[2] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'PCAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '562.36'
)
)
)
And I wanna do like this,
Array(
[AD] => Array(
[NYCT01] => Array(
[ECAR] => Array(
[0] => '295.62'
)
[SCAR] => Array(
[0] => '356.25'
)
[PCAR] => Array(
[0] => '562.36'
)
)
)
)
How can I do that, I tried to use foreach loops but I cant get it work, please help
Thanks for you help. | php | arrays | null | null | null | 06/11/2012 15:46:12 | too localized | How to combine this arrays PHP
===
This three arrays below I want to combine and I don't know how to do that, I want to take the `companyCode` of each array and make it for one array.
I have an array like this,
Array(
[0] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'ECAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '295.62'
)
);
[1] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'SCAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '356.25'
)
[2] => Array(
[companyCode] => SimpleXMLElement Object(
[0] => 'AD'
)
[name] => SimpleXMLElement Object(
[0] => 'NYCT01'
)
[vehicleRentalPrefType] => SimpleXMLElement Object(
[0] => 'PCAR'
)
[rateAmount] => SimpleXMLElement Object(
[0] => '562.36'
)
)
)
And I wanna do like this,
Array(
[AD] => Array(
[NYCT01] => Array(
[ECAR] => Array(
[0] => '295.62'
)
[SCAR] => Array(
[0] => '356.25'
)
[PCAR] => Array(
[0] => '562.36'
)
)
)
)
How can I do that, I tried to use foreach loops but I cant get it work, please help
Thanks for you help. | 3 |
672,798 | 03/23/2009 10:03:18 | 81,325 | 03/23/2009 09:46:49 | 1 | 0 | C# String Format Placeholders in Regular Expressions | I have a regular expression, defined in a verbatim C# string type, like so:
private static string importFileRegex = @"^{0}(\d{4})[W|S]\.(csv|cur)";
The first 3 letters, right after the regex line start (^) can be one of many possible combinations of alphabetic characters.
I want to do an elegant String.Format using the above, placing my 3-letter combination of choice at the start and using this in my matching algorithm, like this:
string regex = String.Format(importFileRegex, "ABC");
Which will give me a regex of ^ABC(\d{4})[W|S]\.(csv|cur)
Problem is, when I do the String.Format, because I have other curly braces in the string (e.g. \d{4}) String.Format looks for something to put in here, can't find it and gives me an error:
System.FormatException : Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Anyone know how, short of splitting the strings out, I can escape the other curly braces or something to avoid the above error?
Cheers,
Andy | formatting | regex | null | null | null | null | open | C# String Format Placeholders in Regular Expressions
===
I have a regular expression, defined in a verbatim C# string type, like so:
private static string importFileRegex = @"^{0}(\d{4})[W|S]\.(csv|cur)";
The first 3 letters, right after the regex line start (^) can be one of many possible combinations of alphabetic characters.
I want to do an elegant String.Format using the above, placing my 3-letter combination of choice at the start and using this in my matching algorithm, like this:
string regex = String.Format(importFileRegex, "ABC");
Which will give me a regex of ^ABC(\d{4})[W|S]\.(csv|cur)
Problem is, when I do the String.Format, because I have other curly braces in the string (e.g. \d{4}) String.Format looks for something to put in here, can't find it and gives me an error:
System.FormatException : Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Anyone know how, short of splitting the strings out, I can escape the other curly braces or something to avoid the above error?
Cheers,
Andy | 0 |
8,473,971 | 12/12/2011 12:00:04 | 1,047,062 | 11/15/2011 07:36:26 | 13 | 0 | C++ non-commercial cross-platform library for Excel | need library to read and write complex data structures into Excel files ( *.xls ) | c++ | excel | cross-platform | null | null | 12/12/2011 12:20:45 | not a real question | C++ non-commercial cross-platform library for Excel
===
need library to read and write complex data structures into Excel files ( *.xls ) | 1 |
2,918,418 | 05/27/2010 04:16:47 | 342,743 | 05/17/2010 04:25:04 | 17 | 0 | which way is correct to retrive data from oracle?? | before answer me plz thinking about the futures of these kind of program and answer me plz.
<br>
I wanna get some data from oracle server like:
1-get all the function,package,procedure and etc for showing them or drop them & etc...<br>
2-compile my *.sql files,get the result if they have problem & etc...
becuz I was beginner in oracle first of all I for solve the second problem I try to connect to sqlPlus by RUN sqlplus and trace the output(I mean,I change the output stream of shell and trace what happend and handle the assigned message to customer. NOW THIS PART SUCCEED. just a little bit I have problem with get all result because the output is asynchronous.any way...
[in this case I log in to oracle Server by send argument to the sqlplus by make a process in c#]
after that I try to get all function,package or procedure name,but I have problem in speed!so I try to use oracle.DataAccess.dll to connect the database.
now I m so confusing about:
which way is correct way to build a program that work like Oracle Developer!
I do not have any experience for like these program how work.
If Your answer is I must use the second way follow this part plz:
I search a little bit the Golden,PLedit (Benthic software),I have little bit problem how I must create the connection string?because I thinking about how I can find the host name or port number that oracle work on them?? am I need read the TNSNames.Ora file?
IF your answer is I must use the first way follow this part plz:
do u have any Idea for how I parse the output?because for example the result of a table is so confusing...[i can handle & program it but I really need someone experience,because the important things to me learn how such software work so nice and with quick response?] All of the has different style in output...
If you are not sure Can u help me which book can help me in this way i become expert?
becuz for example all the C# write just about how u can connect to DB and the DB books write how u can use this DB program,I looking for a book that give me some Idea how develop an interface for do transaction between these two.not simple send and receive data,for example how write a compiler for them.
the language of book is not different for me i know C#,java,VB,sql,Oracle
Thanks.
| c# | oracle | platform-builder | null | null | 05/27/2010 06:02:16 | not a real question | which way is correct to retrive data from oracle??
===
before answer me plz thinking about the futures of these kind of program and answer me plz.
<br>
I wanna get some data from oracle server like:
1-get all the function,package,procedure and etc for showing them or drop them & etc...<br>
2-compile my *.sql files,get the result if they have problem & etc...
becuz I was beginner in oracle first of all I for solve the second problem I try to connect to sqlPlus by RUN sqlplus and trace the output(I mean,I change the output stream of shell and trace what happend and handle the assigned message to customer. NOW THIS PART SUCCEED. just a little bit I have problem with get all result because the output is asynchronous.any way...
[in this case I log in to oracle Server by send argument to the sqlplus by make a process in c#]
after that I try to get all function,package or procedure name,but I have problem in speed!so I try to use oracle.DataAccess.dll to connect the database.
now I m so confusing about:
which way is correct way to build a program that work like Oracle Developer!
I do not have any experience for like these program how work.
If Your answer is I must use the second way follow this part plz:
I search a little bit the Golden,PLedit (Benthic software),I have little bit problem how I must create the connection string?because I thinking about how I can find the host name or port number that oracle work on them?? am I need read the TNSNames.Ora file?
IF your answer is I must use the first way follow this part plz:
do u have any Idea for how I parse the output?because for example the result of a table is so confusing...[i can handle & program it but I really need someone experience,because the important things to me learn how such software work so nice and with quick response?] All of the has different style in output...
If you are not sure Can u help me which book can help me in this way i become expert?
becuz for example all the C# write just about how u can connect to DB and the DB books write how u can use this DB program,I looking for a book that give me some Idea how develop an interface for do transaction between these two.not simple send and receive data,for example how write a compiler for them.
the language of book is not different for me i know C#,java,VB,sql,Oracle
Thanks.
| 1 |
1,904,876 | 12/15/2009 02:36:19 | 5,198 | 09/08/2008 12:46:57 | 268 | 3 | Can Visual Studio's C# intellisense be given a hint to display a certain method overload first? | I have two methods that are overloads of each other
public class Car
{
public int GetPrice(string vinNumber)
{
string make = Database.GetMake(vinNumber); // expensive operation
string model = Database.GetModel(vinNumber); // expensive operation
int year = Database.GetYear(vinNumber); // expensive operation
return this.GetPrice(make, model, year);
}
public int GetPrice(string make, string model, int year)
{
// Calculate value and return
}
}
In my example, the GetPrice(make, model, year) overload is cheap to execute but the GetPrice(vinNumber) method is expensive. The problem is that the expensive method has the fewest parameters and it shows up first in the C# intellisense.
Both methods are valid, but I want to encourage people to call the cheap method. But people tend to not look through all the overloads in Intellisense before choosing a method to call, and the expensive one is being called too often in my company's codebase.
Is there a way to tell Visual Studio to give "intellisense priority" to a particular method so it shows up first?
| c# | visual-studio | intellisense | overloading | null | null | open | Can Visual Studio's C# intellisense be given a hint to display a certain method overload first?
===
I have two methods that are overloads of each other
public class Car
{
public int GetPrice(string vinNumber)
{
string make = Database.GetMake(vinNumber); // expensive operation
string model = Database.GetModel(vinNumber); // expensive operation
int year = Database.GetYear(vinNumber); // expensive operation
return this.GetPrice(make, model, year);
}
public int GetPrice(string make, string model, int year)
{
// Calculate value and return
}
}
In my example, the GetPrice(make, model, year) overload is cheap to execute but the GetPrice(vinNumber) method is expensive. The problem is that the expensive method has the fewest parameters and it shows up first in the C# intellisense.
Both methods are valid, but I want to encourage people to call the cheap method. But people tend to not look through all the overloads in Intellisense before choosing a method to call, and the expensive one is being called too often in my company's codebase.
Is there a way to tell Visual Studio to give "intellisense priority" to a particular method so it shows up first?
| 0 |
6,541,340 | 06/30/2011 21:31:26 | 155,371 | 08/12/2009 19:55:25 | 180 | 12 | Why or Why NOT to use Sharepoint 2010 as a CMS | Can someone please list the pros and cons of using Sharepoint as a CMS? Especially for a site that has a bunch of systems integration and real time data access.
I believe developing a site in ASP.net MVC3 that you will be able to have tighter systems integration, louse coupling, and greater control over the presentation layer.
Any pros and cons would be great. Thanks. | asp.net-mvc | sharepoint | null | null | null | 06/30/2011 21:37:19 | off topic | Why or Why NOT to use Sharepoint 2010 as a CMS
===
Can someone please list the pros and cons of using Sharepoint as a CMS? Especially for a site that has a bunch of systems integration and real time data access.
I believe developing a site in ASP.net MVC3 that you will be able to have tighter systems integration, louse coupling, and greater control over the presentation layer.
Any pros and cons would be great. Thanks. | 2 |
1,708,216 | 11/10/2009 14:07:31 | 207,816 | 11/10/2009 14:07:31 | 1 | 0 | Remove parent element after removing last child element | I have a list of elements on a page, for the sake of discussion we can say I have the following:
<
div id="group_01">
<div id="entry_1-01">stuff <a href="delete">x</a></div>
<div id="entry_1-02">stuff <a href="delete">x</a></div>
</div>
<div id="group_02">
<div id="entry_2-01">stuff <a href="delete">x</a></div>
<div id="entry_2-02">stuff <a href="delete">x</a></div>
</div>
The delete link calls an Ajax request and deletes the entry, after a succesful Ajax call, the entry div is removed from the page. My question is:
How can I remove the containing group div once all of it's entries have been deleted?
I hope that's a detailed enough question. I feel like this isn't anything new, yet two days of search has resulted in nothing.
| javascript | null | null | null | null | null | open | Remove parent element after removing last child element
===
I have a list of elements on a page, for the sake of discussion we can say I have the following:
<
div id="group_01">
<div id="entry_1-01">stuff <a href="delete">x</a></div>
<div id="entry_1-02">stuff <a href="delete">x</a></div>
</div>
<div id="group_02">
<div id="entry_2-01">stuff <a href="delete">x</a></div>
<div id="entry_2-02">stuff <a href="delete">x</a></div>
</div>
The delete link calls an Ajax request and deletes the entry, after a succesful Ajax call, the entry div is removed from the page. My question is:
How can I remove the containing group div once all of it's entries have been deleted?
I hope that's a detailed enough question. I feel like this isn't anything new, yet two days of search has resulted in nothing.
| 0 |
11,392,434 | 07/09/2012 09:35:05 | 184,867 | 10/06/2009 09:42:32 | 181 | 2 | Excel 2007 - cannot open the clipboard | Every now and then within Excel when i do ctrl-x (cut) or ctrl-c (copy) i get the pop-up message 'Cannot open the Clipboard'.
I can't see any particular pattern to it but it's very annoying when it happens.
It doesn't happen in any other software i have installed.
Anyone have any ideas as to why this happens?
Thanks
Paul | error-message | excel-2007 | clipboard | null | null | 07/10/2012 16:46:55 | off topic | Excel 2007 - cannot open the clipboard
===
Every now and then within Excel when i do ctrl-x (cut) or ctrl-c (copy) i get the pop-up message 'Cannot open the Clipboard'.
I can't see any particular pattern to it but it's very annoying when it happens.
It doesn't happen in any other software i have installed.
Anyone have any ideas as to why this happens?
Thanks
Paul | 2 |
11,629,628 | 07/24/2012 11:11:54 | 1,448,963 | 06/11/2012 12:52:41 | 1 | 2 | custom table view: delete/edit row D7 | I've spent hours trying to find good examples or working scripts, but couldn't find anything yet. What I *desire* to achieve: I have a sortable table with database entries in it, each row has a edit and delete link with each its own ID. So far so good. Now I have to add the functionality to actually delete/edit DB rows. Im totally lost..
Its a custom module and don't want to use other modules to achieve this, so these answers are useless : [http://drupal.stackexchange.com/questions/34011/help-needed-for-adding-and-edit-delete-link-in-a-column-in-a-view-table][1]
[I also found this website][2]
[1]: http://drupal.stackexchange.com/questions/34011/help-needed-for-adding-and-edit-delete-link-in-a-column-in-a-view-table
[2]: http://public-action.org/content/drupal-7-form-api-modify-and-delete-record-operations-drupal-7-multi-step-form-fapi
but the description is way too complicated and I think the whole script is incomplete.
I've also tried the http://drupal.org/project/examples but that didn't get me any further
does anyone have really good examples or a complete working module?
thanks for your input
| drupal | delete | edit | null | null | 07/24/2012 12:04:16 | off topic | custom table view: delete/edit row D7
===
I've spent hours trying to find good examples or working scripts, but couldn't find anything yet. What I *desire* to achieve: I have a sortable table with database entries in it, each row has a edit and delete link with each its own ID. So far so good. Now I have to add the functionality to actually delete/edit DB rows. Im totally lost..
Its a custom module and don't want to use other modules to achieve this, so these answers are useless : [http://drupal.stackexchange.com/questions/34011/help-needed-for-adding-and-edit-delete-link-in-a-column-in-a-view-table][1]
[I also found this website][2]
[1]: http://drupal.stackexchange.com/questions/34011/help-needed-for-adding-and-edit-delete-link-in-a-column-in-a-view-table
[2]: http://public-action.org/content/drupal-7-form-api-modify-and-delete-record-operations-drupal-7-multi-step-form-fapi
but the description is way too complicated and I think the whole script is incomplete.
I've also tried the http://drupal.org/project/examples but that didn't get me any further
does anyone have really good examples or a complete working module?
thanks for your input
| 2 |
907,005 | 05/25/2009 14:46:25 | 81,514 | 03/23/2009 16:34:35 | 587 | 21 | Is there a mapping between Books online ms-help:// and http://msdn.microsoft.com | Often when I find an article in the SQL Server BOL I see that the article has an address of ms-help://
but I can't forward this "uri" to a colleague who doesn't have the Sql Server BOL --- so the question is is there a consistent mapping between ms-help:// and http://msdn.microsoft.com
| msdn | sql-server | null | null | null | 07/31/2012 17:18:07 | off topic | Is there a mapping between Books online ms-help:// and http://msdn.microsoft.com
===
Often when I find an article in the SQL Server BOL I see that the article has an address of ms-help://
but I can't forward this "uri" to a colleague who doesn't have the Sql Server BOL --- so the question is is there a consistent mapping between ms-help:// and http://msdn.microsoft.com
| 2 |
202,971 | 10/14/2008 21:43:21 | 16,260 | 09/17/2008 15:48:12 | 311 | 12 | Formula or API for calulating desktop icon spacing on Windows XP. | I've built a simple application that applies grid-lines to an image or just simple colors for use as desktop wallpaper. The idea is that the desktop icons can be arranged within the grid. The problem is that depending on more things than I understand the actual spacing in pixels seems to be different from system to system. I've learned that at least these things play a factor:
- Resolution (duh)
- Taskbar size and placement
- Fonts
There has to be more than this. Maybe there's some api call that I don't know about?
| windows-xp | desktop-wallpaper | null | null | null | null | open | Formula or API for calulating desktop icon spacing on Windows XP.
===
I've built a simple application that applies grid-lines to an image or just simple colors for use as desktop wallpaper. The idea is that the desktop icons can be arranged within the grid. The problem is that depending on more things than I understand the actual spacing in pixels seems to be different from system to system. I've learned that at least these things play a factor:
- Resolution (duh)
- Taskbar size and placement
- Fonts
There has to be more than this. Maybe there's some api call that I don't know about?
| 0 |
8,044,326 | 11/07/2011 23:51:50 | 130,399 | 06/29/2009 11:38:01 | 372 | 14 | Whats an appropriate language for a busy API? | I have a API setup that receives JSON, authenticates it then writes the values to MySQL. The API is written in fairly optimized PHP.
When things get busy, PHP starts to lag and slows down a lot (chews up all the CPU). MySQL is chugging along fine - its quite happy with the writes it needs to perform.
I dont have a lot of resources (in terms of hardware) to chuck at the servers so is there a better language choice for what the API is doing? Something that will run leaner and faster yet still have json / mysql libs that are usable?
Thanks | mysql | api | programming-languages | null | null | 11/09/2011 00:47:56 | not constructive | Whats an appropriate language for a busy API?
===
I have a API setup that receives JSON, authenticates it then writes the values to MySQL. The API is written in fairly optimized PHP.
When things get busy, PHP starts to lag and slows down a lot (chews up all the CPU). MySQL is chugging along fine - its quite happy with the writes it needs to perform.
I dont have a lot of resources (in terms of hardware) to chuck at the servers so is there a better language choice for what the API is doing? Something that will run leaner and faster yet still have json / mysql libs that are usable?
Thanks | 4 |
11,528,687 | 07/17/2012 18:33:26 | 1,210,191 | 02/14/2012 23:12:09 | 19 | 1 | How to export Windows' System Information to a file programmatically | I'm creating a crash report service that could use the information contained in Windows' System Information. Is there a way to export that information to a file so I can include that file in my crash report? Code is appreciated, either in C++ or C# . Thanks | windows | system-information | null | null | null | null | open | How to export Windows' System Information to a file programmatically
===
I'm creating a crash report service that could use the information contained in Windows' System Information. Is there a way to export that information to a file so I can include that file in my crash report? Code is appreciated, either in C++ or C# . Thanks | 0 |
11,397,801 | 07/09/2012 15:04:42 | 1,005,729 | 10/20/2011 17:26:17 | 24 | 1 | PHP Error: Tcp/ip option not available | Anyone know about this error?
Thanks | php | error-handling | null | null | null | 07/09/2012 15:07:29 | not a real question | PHP Error: Tcp/ip option not available
===
Anyone know about this error?
Thanks | 1 |
4,438,205 | 12/14/2010 10:34:33 | 541,761 | 12/14/2010 10:01:07 | 1 | 0 | Making a Database search engine like google !!!!!!!!!!!!! | I'm new to creating websites.I'm creating a Telephone directory search Engine.(Using PostgreSql,CGI scripts).My Database is having Name,Tel.No,City,State,Address.
Upto now I have created a search field like "google" where I can give any of the above Database entries and search.But now I want to give like "name+city+..." So that I can minimize the output entries.
Sorry, If I'm not specific in my question. | database | search | engine | user-friendly | null | 12/16/2010 06:07:05 | not a real question | Making a Database search engine like google !!!!!!!!!!!!!
===
I'm new to creating websites.I'm creating a Telephone directory search Engine.(Using PostgreSql,CGI scripts).My Database is having Name,Tel.No,City,State,Address.
Upto now I have created a search field like "google" where I can give any of the above Database entries and search.But now I want to give like "name+city+..." So that I can minimize the output entries.
Sorry, If I'm not specific in my question. | 1 |
8,790,339 | 01/09/2012 14:57:43 | 445,651 | 09/12/2010 16:20:57 | 401 | 19 | Is naming functions based on contents of an array wrong? | If I have a bunch of functions, and I want to just make a general function that does them all, but I need to access member functions, what should I do? Should I be trying to find a way to variablize the function name? I'd be reaching if I suggested anything else. | php | coding-style | properties | discussion | null | 04/06/2012 17:18:55 | not a real question | Is naming functions based on contents of an array wrong?
===
If I have a bunch of functions, and I want to just make a general function that does them all, but I need to access member functions, what should I do? Should I be trying to find a way to variablize the function name? I'd be reaching if I suggested anything else. | 1 |
133,264 | 09/25/2008 13:18:59 | 11,702 | 09/16/2008 10:27:00 | 1,054 | 27 | What would you like to see in a TDD demo? | I am going to be giving a presentation on TDD and I always struggle with what to put in the demo when giving this presentation. I usually only have about an hour to do the actual coding portion of the demo so it can't be too extravagant. However, using a "classic" example (stack,queue) is a bit simplistic for most developers. It leaves them feeling as though this won't work in a real world solution.
There are a lot of concepts one needs to make TDD work well on their project besides understanding the core testing cycle *(Test, Code, Refactor)*.
- IoC / Dependency Injection / Dependency Inversion
- MVP / MVC (in order to handle testing of user interfaces)
- Mocking
So the question is...
As a developer what kind of **real world** example would you like to see that incorporates these aspects and:
- Fits into an hour or so
- Doesn't overwhelm you
- Isn't so simple that you can't apply it to your current project | testing | polls | tdd | presentations | null | 05/05/2012 13:52:19 | not constructive | What would you like to see in a TDD demo?
===
I am going to be giving a presentation on TDD and I always struggle with what to put in the demo when giving this presentation. I usually only have about an hour to do the actual coding portion of the demo so it can't be too extravagant. However, using a "classic" example (stack,queue) is a bit simplistic for most developers. It leaves them feeling as though this won't work in a real world solution.
There are a lot of concepts one needs to make TDD work well on their project besides understanding the core testing cycle *(Test, Code, Refactor)*.
- IoC / Dependency Injection / Dependency Inversion
- MVP / MVC (in order to handle testing of user interfaces)
- Mocking
So the question is...
As a developer what kind of **real world** example would you like to see that incorporates these aspects and:
- Fits into an hour or so
- Doesn't overwhelm you
- Isn't so simple that you can't apply it to your current project | 4 |
9,849,877 | 03/24/2012 07:13:19 | 777,147 | 05/31/2011 05:56:55 | 1 | 1 | Naming convention for Class with prefix domain name? | I have seen lot projects following this kind of coding style
Any significant advantage the following syntax
My project name : King Author(KA)
I am going create button components. My class name "KAButton"
Is it right approach and what about namespace?
Also please suggest naming convention for GUI components(Flex/Html) ?
| html | actionscript-3 | flex | null | null | 03/25/2012 18:56:41 | not constructive | Naming convention for Class with prefix domain name?
===
I have seen lot projects following this kind of coding style
Any significant advantage the following syntax
My project name : King Author(KA)
I am going create button components. My class name "KAButton"
Is it right approach and what about namespace?
Also please suggest naming convention for GUI components(Flex/Html) ?
| 4 |
468,674 | 01/22/2009 10:56:21 | 55,891 | 01/16/2009 16:09:38 | 6 | 0 | deploying Sql server reports on production boxes | how to deploy Sql server reports on productions boxes.
Locally its not a problem, I just specify the url and then right click on project and say deploy which deploy on my local server.
But its not gonna be the case for the production server | sql-server-2005 | null | null | null | null | null | open | deploying Sql server reports on production boxes
===
how to deploy Sql server reports on productions boxes.
Locally its not a problem, I just specify the url and then right click on project and say deploy which deploy on my local server.
But its not gonna be the case for the production server | 0 |
4,965,600 | 02/11/2011 04:21:24 | 607,523 | 02/08/2011 03:26:00 | 3 | 0 | My first Python program! Anyone care to review it an help me improve? | I just wrote my first Python program and it works! It is a program that will rename subtitle files to their matching video files so that media players will pick up the subtitles (e.g. it will rename "The_Office_3x01.str" to "The.Office.S03E01.str" if a file named "The.Office.S03E01.avi" was present in the directory).
I'd love for someone to comment/criticize my code and help me improve my coding style and make it more Python-y. You can find the code at http://subtitle-renamer.googlecode.com/hg/renombrador.py
As I said, it is my very first program in Python, so feel free to comment on anything like:
- Style (indentation, variable names, conventions, etc.)
- Design
- Python features I should be using that I'm not
- My use of the libraries
Thanks! | python | null | null | null | null | 02/11/2011 04:40:12 | off topic | My first Python program! Anyone care to review it an help me improve?
===
I just wrote my first Python program and it works! It is a program that will rename subtitle files to their matching video files so that media players will pick up the subtitles (e.g. it will rename "The_Office_3x01.str" to "The.Office.S03E01.str" if a file named "The.Office.S03E01.avi" was present in the directory).
I'd love for someone to comment/criticize my code and help me improve my coding style and make it more Python-y. You can find the code at http://subtitle-renamer.googlecode.com/hg/renombrador.py
As I said, it is my very first program in Python, so feel free to comment on anything like:
- Style (indentation, variable names, conventions, etc.)
- Design
- Python features I should be using that I'm not
- My use of the libraries
Thanks! | 2 |
9,104,889 | 02/01/2012 23:20:01 | 1,166,865 | 01/24/2012 11:26:10 | 5 | 0 | I don't have a macbook and I want to learn Objective C / develop programs in Objective C | exist Cloud IDE or other intruments to develop and compiling programs in Objective C ?<br>
thanks ! | objective-c | ide | null | null | null | null | open | I don't have a macbook and I want to learn Objective C / develop programs in Objective C
===
exist Cloud IDE or other intruments to develop and compiling programs in Objective C ?<br>
thanks ! | 0 |
10,851,038 | 06/01/2012 13:16:20 | 975,305 | 10/02/2011 10:26:27 | 543 | 1 | Regenerate nginx logs | I am currently logging all the activity on my web page to the nginx web-server which is in the file access.log . This file is incomprehensible because of its format, i wish to analyze these log files by exporting them to Hadoop Hive. However, hive cannot comprehend raw nginx logs. Thus I plan to regenerate these logs into JSON or CSV format and thereafter export them to hive where I can query and analyze the logs. Please suggest me some tools/methods which would enable me to do the above work.
Currently my nginx logs look like follows:
115.249.242.17 - - [01/Jun/2012:18:44:57 +0530] "GET /flashlayer?videoId=66127&playSessionId=VOD_66127_e04393db-0b40-44b1-aad8-aa2169ac71a710.32.6.1311338556485611&duration=0&playerState=playing&playerError=null HTTP/1.1" 200 86 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
| logging | hadoop | nginx | webserver | hive | null | open | Regenerate nginx logs
===
I am currently logging all the activity on my web page to the nginx web-server which is in the file access.log . This file is incomprehensible because of its format, i wish to analyze these log files by exporting them to Hadoop Hive. However, hive cannot comprehend raw nginx logs. Thus I plan to regenerate these logs into JSON or CSV format and thereafter export them to hive where I can query and analyze the logs. Please suggest me some tools/methods which would enable me to do the above work.
Currently my nginx logs look like follows:
115.249.242.17 - - [01/Jun/2012:18:44:57 +0530] "GET /flashlayer?videoId=66127&playSessionId=VOD_66127_e04393db-0b40-44b1-aad8-aa2169ac71a710.32.6.1311338556485611&duration=0&playerState=playing&playerError=null HTTP/1.1" 200 86 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
| 0 |
11,536,711 | 07/18/2012 07:55:13 | 665,557 | 03/18/2011 05:25:07 | 712 | 2 | SQL Group by, Having, and Ordering (MySQL) | I have the following SQL:
select code, distance from places;
The output is below:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
80 2117.61925131453
106 2563.46708627407
I want to be able to just get a single code and the closest distance. So I want it to return this:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
Still playing with Distinct and Group By.
| mysql | sql | query | group-by | distinct | null | open | SQL Group by, Having, and Ordering (MySQL)
===
I have the following SQL:
select code, distance from places;
The output is below:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
80 2117.61925131453
106 2563.46708627407
I want to be able to just get a single code and the closest distance. So I want it to return this:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
Still playing with Distinct and Group By.
| 0 |
11,741,864 | 07/31/2012 13:59:21 | 1,565,950 | 07/31/2012 13:54:33 | 1 | 0 | Delphi Firemonkey - Find Nearest City | I am trying to get the Closest City for the mac using Delphi Firemonkey. Anyone have any assistance in this solution? | delphi | firemonkey | null | null | null | 07/31/2012 17:34:56 | not a real question | Delphi Firemonkey - Find Nearest City
===
I am trying to get the Closest City for the mac using Delphi Firemonkey. Anyone have any assistance in this solution? | 1 |
7,116,624 | 08/19/2011 03:27:25 | 828,584 | 07/04/2011 18:34:01 | 276 | 12 | Falling through a switch case? | I was in the process of writing a switch case when I read on the PHP site:
`Thus, it is important not to forget break statements (even though you may want to avoid supplying them on purpose under certain circumstances).`
A switch case without break statements was perfect for what I wanted to do. I want all the cases below the matched one to execute. Why is this wrong, and what is the best way to do it differently?
Is it bad for all languages, or just PHP? Why?
| c# | php | javascript | null | null | null | open | Falling through a switch case?
===
I was in the process of writing a switch case when I read on the PHP site:
`Thus, it is important not to forget break statements (even though you may want to avoid supplying them on purpose under certain circumstances).`
A switch case without break statements was perfect for what I wanted to do. I want all the cases below the matched one to execute. Why is this wrong, and what is the best way to do it differently?
Is it bad for all languages, or just PHP? Why?
| 0 |
10,146,431 | 04/13/2012 18:35:16 | 1,327,315 | 04/11/2012 18:07:23 | 1 | 0 | ADT plug-in fails to install on Eclipse, PowerPC, Ubuntu | I'm trying to install ADT plug-in in Eclipse 3.5.2 which I got from PowerPC Ubuntu repositories. ADT 16.0.0 or above requires Eclipse 3.6 or higher so I tried 15.0.1 and 9.0.0.
ADT 15.0.1 installation completed 100%, I clicked "Apply Now" and got a bunch of errors. From Error [Log][1]:
Invalid preference page path: com.android.ide.eclipse.preferences.main
Problems occurred when invoking code from plug-in: "org.eclipse.ui.intro".
Undefined context while filtering dialog/window contexts
Unable to access file "plugins/org.eclipse.emf.ecore_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.environment_1.0.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.ui_1.1.2.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.equinox.concurrent_1.0.1.R35x_v20100209.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.project.facet.core_1.4.1.v200911141735.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.resolver_1.2.0.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.jem.util_2.0.201.v201001252130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.common_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.ui_1.1.102.v200910200227.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.uriresolver_1.1.301.v200805140415.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emfworkbench.integration_1.1.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xerces_2.9.0.v200909240008.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emf_1.1.301.v200908181930.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/javax.xml_1.3.4.v200902170245.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.change_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.core_1.1.402.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.frameworks_1.1.300.v200904160730.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.serializer_2.7.1.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.ui_1.1.402.v200901262305.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.validation_1.2.104.v200911120201.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.core_1.1.402.v201001251516.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.core_1.1.201.v200806010600.jar!META-INF/MANIFEST.MF".
Invalid preference page path: DDMS
Invalid preference page path: LogCat
ADT 9.0.0 Installation went the same. From Error [Log][2]:
[1]: http://pastebin.com/wZwSETWN
[2]: http://pastebin.com/32TMwWZK
Invalid preference page path: com.android.ide.eclipse.preferences.main
Undefined context while filtering dialog/window contexts
Unable to access file "plugins/org.eclipse.emf.ecore_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.environment_1.0.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.ui_1.1.2.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.equinox.concurrent_1.0.1.R35x_v20100209.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.project.facet.core_1.4.1.v200911141735.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.resolver_1.2.0.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.jem.util_2.0.201.v201001252130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.common_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.ui_1.1.102.v200910200227.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.uriresolver_1.1.301.v200805140415.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emfworkbench.integration_1.1.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xerces_2.9.0.v200909240008.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emf_1.1.301.v200908181930.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/javax.xml_1.3.4.v200902170245.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.change_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.gef_3.5.1.v20090910-2020.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.core_1.1.402.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.frameworks_1.1.300.v200904160730.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.serializer_2.7.1.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.ui_1.1.402.v200901262305.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.validation_1.2.104.v200911120201.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.core_1.1.402.v201001251516.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.core_1.1.201.v200806010600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.draw2d_3.5.2.v20091126-1908.jar!META-INF/MANIFEST.MF".
Invalid preference page path: DDMS
Invalid preference page path: LogCat
Android tab did not appear in Window > Preferences.
Also, both installations took 2 hours.
So, is it possible to install ADT plug-in to Eclipse on PowerPC Ubuntu? Is there any way to install Eclipse 3.6 or 3.7 on my system? My computer is PowerPC G4, Emac (ATI Graphics), Ubuntu 10.04. | eclipse | ubuntu | installation | adt | powerpc | null | open | ADT plug-in fails to install on Eclipse, PowerPC, Ubuntu
===
I'm trying to install ADT plug-in in Eclipse 3.5.2 which I got from PowerPC Ubuntu repositories. ADT 16.0.0 or above requires Eclipse 3.6 or higher so I tried 15.0.1 and 9.0.0.
ADT 15.0.1 installation completed 100%, I clicked "Apply Now" and got a bunch of errors. From Error [Log][1]:
Invalid preference page path: com.android.ide.eclipse.preferences.main
Problems occurred when invoking code from plug-in: "org.eclipse.ui.intro".
Undefined context while filtering dialog/window contexts
Unable to access file "plugins/org.eclipse.emf.ecore_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.environment_1.0.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.ui_1.1.2.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.equinox.concurrent_1.0.1.R35x_v20100209.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.project.facet.core_1.4.1.v200911141735.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.resolver_1.2.0.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.jem.util_2.0.201.v201001252130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.common_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.ui_1.1.102.v200910200227.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.uriresolver_1.1.301.v200805140415.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emfworkbench.integration_1.1.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xerces_2.9.0.v200909240008.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emf_1.1.301.v200908181930.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/javax.xml_1.3.4.v200902170245.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.change_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.core_1.1.402.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.frameworks_1.1.300.v200904160730.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.serializer_2.7.1.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.ui_1.1.402.v200901262305.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.validation_1.2.104.v200911120201.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.core_1.1.402.v201001251516.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.core_1.1.201.v200806010600.jar!META-INF/MANIFEST.MF".
Invalid preference page path: DDMS
Invalid preference page path: LogCat
ADT 9.0.0 Installation went the same. From Error [Log][2]:
[1]: http://pastebin.com/wZwSETWN
[2]: http://pastebin.com/32TMwWZK
Invalid preference page path: com.android.ide.eclipse.preferences.main
Undefined context while filtering dialog/window contexts
Unable to access file "plugins/org.eclipse.emf.ecore_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.environment_1.0.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.ui_1.1.2.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.equinox.concurrent_1.0.1.R35x_v20100209.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.project.facet.core_1.4.1.v200911141735.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.resolver_1.2.0.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.jem.util_2.0.201.v201001252130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.common_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.ui_1.1.102.v200910200227.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.uriresolver_1.1.301.v200805140415.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.edit_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emfworkbench.integration_1.1.301.v200908101600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xerces_2.9.0.v200909240008.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.emf_1.1.301.v200908181930.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/javax.xml_1.3.4.v200902170245.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.change_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.gef_3.5.1.v20090910-2020.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.xml.core_1.1.402.v201001222130.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.frameworks_1.1.300.v200904160730.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.apache.xml.serializer_2.7.1.v200902170519.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.ui_1.1.402.v200901262305.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.validation_1.2.104.v200911120201.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.sse.core_1.1.402.v201001251516.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.wst.common.core_1.1.201.v200806010600.jar!META-INF/MANIFEST.MF".
Unable to access file "plugins/org.eclipse.draw2d_3.5.2.v20091126-1908.jar!META-INF/MANIFEST.MF".
Invalid preference page path: DDMS
Invalid preference page path: LogCat
Android tab did not appear in Window > Preferences.
Also, both installations took 2 hours.
So, is it possible to install ADT plug-in to Eclipse on PowerPC Ubuntu? Is there any way to install Eclipse 3.6 or 3.7 on my system? My computer is PowerPC G4, Emac (ATI Graphics), Ubuntu 10.04. | 0 |
5,725,646 | 04/20/2011 04:47:44 | 505,797 | 06/23/2010 07:07:43 | 110 | 0 | Keyboard shortcut for resizing image | Is there a keyboard shortcut to resize an image? please help me. | keyboard | keyboard-shortcuts | null | null | null | 04/20/2011 10:40:37 | off topic | Keyboard shortcut for resizing image
===
Is there a keyboard shortcut to resize an image? please help me. | 2 |
6,366,046 | 06/16/2011 00:57:31 | 799,110 | 06/15/2011 07:20:31 | 1 | 0 | code review: finding </body> tag reverse search on a non-null terminated char str | src is a non-null terminated char string whose length is data_len
I want to start from the end of tis array, and find the first occurrence of html </body> tag...
find_pos should hold the position of the </body> tag with src
does the code below look correct to you?
thanks!
const char* p, *found_pos =NULL;
for (p = &src[data_len - 1]; (((u_int)(p - src) >= 6) && !found_pos); p--) {
if ((*p == '>') && (u_int)(p - src) >=6) {
if ((toupper(*(p - 1)) == 'Y') &&
(toupper(*(p - 2)) == 'D') &&
(toupper(*(p - 3)) == 'O') &&
(toupper(*(p - 4)) == 'B') &&
((*(p - 5)) == '/') &&
((*(p - 6)) == '<')) {
found_pos = ( p - 6);
}
}
}
| c++ | c | null | null | null | 06/16/2011 09:05:26 | off topic | code review: finding </body> tag reverse search on a non-null terminated char str
===
src is a non-null terminated char string whose length is data_len
I want to start from the end of tis array, and find the first occurrence of html </body> tag...
find_pos should hold the position of the </body> tag with src
does the code below look correct to you?
thanks!
const char* p, *found_pos =NULL;
for (p = &src[data_len - 1]; (((u_int)(p - src) >= 6) && !found_pos); p--) {
if ((*p == '>') && (u_int)(p - src) >=6) {
if ((toupper(*(p - 1)) == 'Y') &&
(toupper(*(p - 2)) == 'D') &&
(toupper(*(p - 3)) == 'O') &&
(toupper(*(p - 4)) == 'B') &&
((*(p - 5)) == '/') &&
((*(p - 6)) == '<')) {
found_pos = ( p - 6);
}
}
}
| 2 |
7,777,069 | 10/15/2011 09:48:11 | 491,708 | 10/29/2010 19:40:06 | 130 | 6 | acts_as_taggable_on: how to optimize the query? | I use acts_as_taggable_on in my current Rails project. On one overview page i am displaying an index of objects with their associated tags. I use the following code:
class Project < ActiveRecord::Base
acts_as_taggable_on :categories
end
class ProjectsController < ApplicationController
def index
@projects = Project.all
end
end
#in the view
<% - @projects.each do |p| %>
<%= p.name %>
<%- p.category_list.each do |t|
<%= t
<%- end %>
<%- end %>
This all works as expected. However, if i am displaying 20 projects, acts_as_taggable_on is firing 20 queries to fetch the associated tags.
How can I include the loading of the tags in the original db query?
Thanks for you time.
| ruby-on-rails | activerecord | acts-as-taggable-on | null | null | null | open | acts_as_taggable_on: how to optimize the query?
===
I use acts_as_taggable_on in my current Rails project. On one overview page i am displaying an index of objects with their associated tags. I use the following code:
class Project < ActiveRecord::Base
acts_as_taggable_on :categories
end
class ProjectsController < ApplicationController
def index
@projects = Project.all
end
end
#in the view
<% - @projects.each do |p| %>
<%= p.name %>
<%- p.category_list.each do |t|
<%= t
<%- end %>
<%- end %>
This all works as expected. However, if i am displaying 20 projects, acts_as_taggable_on is firing 20 queries to fetch the associated tags.
How can I include the loading of the tags in the original db query?
Thanks for you time.
| 0 |
498,482 | 01/31/2009 08:07:57 | 9,484 | 09/15/2008 18:57:41 | 11 | 5 | What's wrong with this linq expression? | List<PageInfo> subPages = new List<PageInfo>();
// ...
// some code to populate subPages here...
// ...
List<Guid> subPageGuids = new List<Guid> {from x in subPages select x.Id}; //doesn't work
PageInfo has an Id field which is of type Guid. So x.Id is a System.Guid.
2nd line of code above does not work...I get two errors:
- The best overloaded Add method
'System.Collections.Generic.List<System.Guid>.Add(System.Guid)'
for the collection initializer has
some invalid arguments
- Argument '1': cannot convert from 'System.Collections.Generic.IEnumerable<System.Guid>'
to 'System.Guid'
I've only been coding in C# for about a week, but I've done a similar pattern before and never had this problem. | c# | linq | .net | null | null | null | open | What's wrong with this linq expression?
===
List<PageInfo> subPages = new List<PageInfo>();
// ...
// some code to populate subPages here...
// ...
List<Guid> subPageGuids = new List<Guid> {from x in subPages select x.Id}; //doesn't work
PageInfo has an Id field which is of type Guid. So x.Id is a System.Guid.
2nd line of code above does not work...I get two errors:
- The best overloaded Add method
'System.Collections.Generic.List<System.Guid>.Add(System.Guid)'
for the collection initializer has
some invalid arguments
- Argument '1': cannot convert from 'System.Collections.Generic.IEnumerable<System.Guid>'
to 'System.Guid'
I've only been coding in C# for about a week, but I've done a similar pattern before and never had this problem. | 0 |
6,826,310 | 07/26/2011 06:49:14 | 17,232 | 09/18/2008 04:53:07 | 1,803 | 128 | Casting a Boost FileSystem3 iterator to a const char* |
I'm looping over some file in a directory using Boost FileSystem 3 and I need to cast the filename to a char* for another lib, Unfortunately my C++ foo is lacking, can anyone help ?
int main(int argc, char* argv[])
{
path p (argv[1]); // p reads clearer than argv[1] in the following code
try
{
if (exists(p)) // does p actually exist?
{
if (is_regular_file(p)) // is p a regular file?
cout << p << " size is " << file_size(p) << '\n';
else if (is_directory(p)) // is p a directory?
{
cout << p << " is a directory containing:\n";
typedef vector<path> vec; // store paths,
vec v; // so we can sort them later
copy(directory_iterator(p), directory_iterator(), back_inserter(v));
sort(v.begin(), v.end()); // sort, since directory iteration
// is not ordered on some file systems
for (vec::const_iterator it (v.begin()); it != v.end(); ++it)
{
cout << " " << *it << '\n';
/****************** stuck here **************************/
// I need to cast *it to a const char* filename
/****************** stuck here **************************/
}
}
else
cout << p << " exists, but is neither a regular file nor a directory\n";
}
else
cout << p << " does not exist\n";
}
catch (const filesystem_error& ex)
{
cout << ex.what() << '\n';
}
return 0;
} | c++ | boost | casting | null | null | null | open | Casting a Boost FileSystem3 iterator to a const char*
===
I'm looping over some file in a directory using Boost FileSystem 3 and I need to cast the filename to a char* for another lib, Unfortunately my C++ foo is lacking, can anyone help ?
int main(int argc, char* argv[])
{
path p (argv[1]); // p reads clearer than argv[1] in the following code
try
{
if (exists(p)) // does p actually exist?
{
if (is_regular_file(p)) // is p a regular file?
cout << p << " size is " << file_size(p) << '\n';
else if (is_directory(p)) // is p a directory?
{
cout << p << " is a directory containing:\n";
typedef vector<path> vec; // store paths,
vec v; // so we can sort them later
copy(directory_iterator(p), directory_iterator(), back_inserter(v));
sort(v.begin(), v.end()); // sort, since directory iteration
// is not ordered on some file systems
for (vec::const_iterator it (v.begin()); it != v.end(); ++it)
{
cout << " " << *it << '\n';
/****************** stuck here **************************/
// I need to cast *it to a const char* filename
/****************** stuck here **************************/
}
}
else
cout << p << " exists, but is neither a regular file nor a directory\n";
}
else
cout << p << " does not exist\n";
}
catch (const filesystem_error& ex)
{
cout << ex.what() << '\n';
}
return 0;
} | 0 |
9,811,077 | 03/21/2012 18:58:41 | 1,165,694 | 01/23/2012 19:52:42 | 5 | 2 | update delete listview items | I have a listview that when clicked opens up but doesnt display detailed information about that list view item. The data for the listview is entered in by a class into a sqlite datase and pulled from a sqlite database by another class. Not sure where I went wrong with the class the should pul the data when a list viewitem is clicked. I do not have enough pont to post imaged of the related xml files but the onClick methods are below
Listview:
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
Toast.makeText(getApplicationContext(), "clicked on :" + arg2, Toast.LENGTH_SHORT).show();
Intent updateDeleteLoginInfo = new Intent (this, UpdateDeleteLoginList.class);
LoginDetails clickedObject = loginArrayList.get(arg2);
Bundle loginBundle = new Bundle();
loginBundle.putString("clickedwebSite",clickedObject.getsName());
loginBundle.putString("clickedwebAddress",clickedObject.getwUrl());
loginBundle.putString("clickeduserName",clickedObject.getuName());
loginBundle.putString("clickedpassWord",clickedObject.getpWord());
updateDeleteLoginInfo.putExtras(loginBundle);
startActivity(updateDeleteLoginInfo);
Update Class:
@Override
public void onClick(View v){
loginSitetext = sName.getText().toString();
loginAddresstext = wUrl.getText().toString();
loginUsertext = uName.getText().toString();
loginpassWordtext = pWord.getText().toString();
LoginDetails loginDetails = new LoginDetails();
loginDetails.setsName(bundledWebSite);
loginDetails.setwUrl(bundledWebAddress);
loginDetails.setuName(bundledUserName);
loginDetails.setpWord(bundledPassWord);
if(v.getId()==R.id.rucBttn){
finish();
}else if(v.getId()==R.id.ruuBttn){
updateLoginDetails(loginDetails);
}else if(v.getId()==R.id.rudBttn){
deleteLoginDetails(loginDetails);
}
}
private void updateLoginDetails(LoginDetails loginDetails){
dataStore androidOpenDbHelper = new dataStore(this);
SQLiteDatabase sqliteDatabase = androidOpenDbHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(dataStore.COLUMN_NAME_SITE, loginSitetext);
contentValues.put(dataStore.COLUMN_NAME_ADDRESS, loginAddresstext);
contentValues.put(dataStore.COLUMN_NAME_USERNAME, loginUsertext);
contentValues.put(dataStore.COLUMN_NAME_PASSWORD, loginpassWordtext);
String[] whereClauseArgument = new String[1];
whereClauseArgument[0]= loginDetails.getsName();
System.out.println("whereClauseArgument[0] is :" + whereClauseArgument[0]);
sqliteDatabase.update(dataStore.TABLE_NAME_INFOTABLE, contentValues, dataStore.COLUMN_NAME_SITE+"=?", whereClauseArgument);
sqliteDatabase.close();
finish();
}
private void deleteLoginDetails(LoginDetails deleteLoginDetails){
dataStore androidOpenDbHelper = new dataStore(this);
SQLiteDatabase sqliteDatabase = androidOpenDbHelper.getWritableDatabase();
String[] whereClauseArgument = new String[1];
whereClauseArgument[0] = deleteLoginDetails.getsName();
sqliteDatabase.delete(dataStore.TABLE_NAME_INFOTABLE,dataStore.COLUMN_NAME_SITE+"=?", whereClauseArgument);
sqliteDatabase.close();
finish();
| android | android-listview | null | null | null | null | open | update delete listview items
===
I have a listview that when clicked opens up but doesnt display detailed information about that list view item. The data for the listview is entered in by a class into a sqlite datase and pulled from a sqlite database by another class. Not sure where I went wrong with the class the should pul the data when a list viewitem is clicked. I do not have enough pont to post imaged of the related xml files but the onClick methods are below
Listview:
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
Toast.makeText(getApplicationContext(), "clicked on :" + arg2, Toast.LENGTH_SHORT).show();
Intent updateDeleteLoginInfo = new Intent (this, UpdateDeleteLoginList.class);
LoginDetails clickedObject = loginArrayList.get(arg2);
Bundle loginBundle = new Bundle();
loginBundle.putString("clickedwebSite",clickedObject.getsName());
loginBundle.putString("clickedwebAddress",clickedObject.getwUrl());
loginBundle.putString("clickeduserName",clickedObject.getuName());
loginBundle.putString("clickedpassWord",clickedObject.getpWord());
updateDeleteLoginInfo.putExtras(loginBundle);
startActivity(updateDeleteLoginInfo);
Update Class:
@Override
public void onClick(View v){
loginSitetext = sName.getText().toString();
loginAddresstext = wUrl.getText().toString();
loginUsertext = uName.getText().toString();
loginpassWordtext = pWord.getText().toString();
LoginDetails loginDetails = new LoginDetails();
loginDetails.setsName(bundledWebSite);
loginDetails.setwUrl(bundledWebAddress);
loginDetails.setuName(bundledUserName);
loginDetails.setpWord(bundledPassWord);
if(v.getId()==R.id.rucBttn){
finish();
}else if(v.getId()==R.id.ruuBttn){
updateLoginDetails(loginDetails);
}else if(v.getId()==R.id.rudBttn){
deleteLoginDetails(loginDetails);
}
}
private void updateLoginDetails(LoginDetails loginDetails){
dataStore androidOpenDbHelper = new dataStore(this);
SQLiteDatabase sqliteDatabase = androidOpenDbHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(dataStore.COLUMN_NAME_SITE, loginSitetext);
contentValues.put(dataStore.COLUMN_NAME_ADDRESS, loginAddresstext);
contentValues.put(dataStore.COLUMN_NAME_USERNAME, loginUsertext);
contentValues.put(dataStore.COLUMN_NAME_PASSWORD, loginpassWordtext);
String[] whereClauseArgument = new String[1];
whereClauseArgument[0]= loginDetails.getsName();
System.out.println("whereClauseArgument[0] is :" + whereClauseArgument[0]);
sqliteDatabase.update(dataStore.TABLE_NAME_INFOTABLE, contentValues, dataStore.COLUMN_NAME_SITE+"=?", whereClauseArgument);
sqliteDatabase.close();
finish();
}
private void deleteLoginDetails(LoginDetails deleteLoginDetails){
dataStore androidOpenDbHelper = new dataStore(this);
SQLiteDatabase sqliteDatabase = androidOpenDbHelper.getWritableDatabase();
String[] whereClauseArgument = new String[1];
whereClauseArgument[0] = deleteLoginDetails.getsName();
sqliteDatabase.delete(dataStore.TABLE_NAME_INFOTABLE,dataStore.COLUMN_NAME_SITE+"=?", whereClauseArgument);
sqliteDatabase.close();
finish();
| 0 |
11,573,400 | 07/20/2012 05:29:22 | 1,539,784 | 07/20/2012 05:21:26 | 1 | 0 | replace function in std::string giving problems in C++ | I am using C++ string functions in cocos2dx. I have the following string CorrectAns = "below".
for(int i = 0; i<CorrectAns.size();i++)
{
CorrectAns.replace(i,i,"?");
}
This function should return my string as "?????", but its returning only 4 charcters ie "????".
When I write like this,
for(int i = 0; i<CorrectAns.size();i++)
{
if(i == 0)
{
CorrectAns.replace(i,i,"?");
}
}
It just crashes.
and works fine only when I write it as " CorrectAns.replace(i,i+1,"?");"
Why is the function working this way?? Can anyone help me please?? | c++ | string | cocos2d-x | null | null | 07/20/2012 20:31:39 | too localized | replace function in std::string giving problems in C++
===
I am using C++ string functions in cocos2dx. I have the following string CorrectAns = "below".
for(int i = 0; i<CorrectAns.size();i++)
{
CorrectAns.replace(i,i,"?");
}
This function should return my string as "?????", but its returning only 4 charcters ie "????".
When I write like this,
for(int i = 0; i<CorrectAns.size();i++)
{
if(i == 0)
{
CorrectAns.replace(i,i,"?");
}
}
It just crashes.
and works fine only when I write it as " CorrectAns.replace(i,i+1,"?");"
Why is the function working this way?? Can anyone help me please?? | 3 |
11,452,733 | 07/12/2012 13:19:12 | 1,520,841 | 07/12/2012 13:01:28 | 1 | 0 | Retrieving non-hidden forum threads in MySQL in possibly infinite subforum structure | I recently inherited an application with a custom-built forum. This forum has "categories", who have "subcategories", who may have "subforums", all of which can have a flag "hidden" set.
Threads can be posted in subcategories and in subforums, but not directly in categories.
I now need to retrieve threads from this forum which are not hidden, meaning that if a thread is placed in a hidden subforum, it won't show up. However, it should also not show up if the parent subcategory or parent category is hidden.
Easy enough so far. My problem is that subforums can have subforums of their own. Theoretically, there's no max depth - it could well be the case that subforum a belongs to subforum b which belongs to subforum c which belongs to subforum d which is hidden. If I'd built it myself, I would have kept track of child and parent lists in the forums, but this is unfortunately not the case.
Is there any way that I can still perform this search or do I have to prune the search results by scripting after retrieving?
I apologise if the above is not clear. Thanks for any help! | mysql | iteration | hierarchy | null | null | null | open | Retrieving non-hidden forum threads in MySQL in possibly infinite subforum structure
===
I recently inherited an application with a custom-built forum. This forum has "categories", who have "subcategories", who may have "subforums", all of which can have a flag "hidden" set.
Threads can be posted in subcategories and in subforums, but not directly in categories.
I now need to retrieve threads from this forum which are not hidden, meaning that if a thread is placed in a hidden subforum, it won't show up. However, it should also not show up if the parent subcategory or parent category is hidden.
Easy enough so far. My problem is that subforums can have subforums of their own. Theoretically, there's no max depth - it could well be the case that subforum a belongs to subforum b which belongs to subforum c which belongs to subforum d which is hidden. If I'd built it myself, I would have kept track of child and parent lists in the forums, but this is unfortunately not the case.
Is there any way that I can still perform this search or do I have to prune the search results by scripting after retrieving?
I apologise if the above is not clear. Thanks for any help! | 0 |
9,047,952 | 01/28/2012 19:34:31 | 751,963 | 05/13/2011 07:47:24 | 32 | 0 | auto checking and submitting to mysql | i have a signup form with three field.
username,password,email when users submit the button all data will be stored in table A.below email one hidden field is there .when users enters the email address it checks in table B(Not table A)if that email is available in table B then i want the input of hidden field should be the id of corresponding row of table B where that email address is available otherwise leave the hidden field blank.
so that when i submit the form with username ,password and email address that hidden field (whose input is coming from table B.) will be submitted to table A.
please help
| php | mysql | ajax | null | null | 01/29/2012 13:38:56 | not a real question | auto checking and submitting to mysql
===
i have a signup form with three field.
username,password,email when users submit the button all data will be stored in table A.below email one hidden field is there .when users enters the email address it checks in table B(Not table A)if that email is available in table B then i want the input of hidden field should be the id of corresponding row of table B where that email address is available otherwise leave the hidden field blank.
so that when i submit the form with username ,password and email address that hidden field (whose input is coming from table B.) will be submitted to table A.
please help
| 1 |
8,405,367 | 12/06/2011 19:07:17 | 1,021,173 | 10/30/2011 22:51:23 | 1 | 0 | index.php in CakePHP i dont get it | i dont know where something is wrong, the zip file was just been given to me, and a set of programmer 'did' the 'half' of the work, and now i should do it, the problem is, i dont know where the error is, nothing shows when i go to localhost/wookay/
here's the code`<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
define('APP_PATH', null);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
return;
} else {
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch($url);
}
if (Configure::read() > 0) {
echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
}
?>` | php | cakephp | frameworks | null | null | 12/06/2011 19:25:03 | not a real question | index.php in CakePHP i dont get it
===
i dont know where something is wrong, the zip file was just been given to me, and a set of programmer 'did' the 'half' of the work, and now i should do it, the problem is, i dont know where the error is, nothing shows when i go to localhost/wookay/
here's the code`<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
define('APP_PATH', null);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
return;
} else {
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch($url);
}
if (Configure::read() > 0) {
echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
}
?>` | 1 |
2,818,511 | 05/12/2010 11:56:19 | 252,593 | 01/17/2010 12:48:21 | 38 | 13 | jquery detect the url to witch something will get redirected | I have a window.onbeforeunload function, and I want to detect where I will get redirected to...
any ideas?
Markus | jquery | null | null | null | null | null | open | jquery detect the url to witch something will get redirected
===
I have a window.onbeforeunload function, and I want to detect where I will get redirected to...
any ideas?
Markus | 0 |
9,586,464 | 03/06/2012 12:55:32 | 653,379 | 03/10/2011 10:59:08 | 719 | 2 | History of the IP address | When and why did networks start using IP addresses? Who were the people that came up with this idea? Did they write some article or publication about their intent or why they couldn't use MAC addresses?
Which networks were first connected together using IP address as an addressing mechanism (because MAC addresses couldn't be used anymore) and which companies or institutions were involved in the beginning of using IP addresses? | technology | null | null | null | null | 03/08/2012 03:09:11 | off topic | History of the IP address
===
When and why did networks start using IP addresses? Who were the people that came up with this idea? Did they write some article or publication about their intent or why they couldn't use MAC addresses?
Which networks were first connected together using IP address as an addressing mechanism (because MAC addresses couldn't be used anymore) and which companies or institutions were involved in the beginning of using IP addresses? | 2 |
8,526,408 | 12/15/2011 20:51:27 | 967,451 | 09/27/2011 15:54:34 | 401 | 5 | What is a good open source chat script? | I have a need to implement a chat feature on a site I'm working on, not group chat but 1 on 1 chat where the conversations would always be between 2 people.
Does anyone know of any good open source high performance chat software I can use for this? I found some PHP/MySQL/AJAX solutions but I imagine these are not very efficient since they all work by storing the chat messages in
a MySQL database and retrieves them with periodic Ajax requests.
I feel a solution written in C, Java or Action Script would be better for this type of software. So are there any good open source ones out there you can recommend?
P.S. the site itself is a LAMP app (PHP/MySQL). | c# | java | c++ | actionscript-3 | chat | 12/15/2011 21:31:00 | not constructive | What is a good open source chat script?
===
I have a need to implement a chat feature on a site I'm working on, not group chat but 1 on 1 chat where the conversations would always be between 2 people.
Does anyone know of any good open source high performance chat software I can use for this? I found some PHP/MySQL/AJAX solutions but I imagine these are not very efficient since they all work by storing the chat messages in
a MySQL database and retrieves them with periodic Ajax requests.
I feel a solution written in C, Java or Action Script would be better for this type of software. So are there any good open source ones out there you can recommend?
P.S. the site itself is a LAMP app (PHP/MySQL). | 4 |
3,470,480 | 08/12/2010 17:43:28 | 418,714 | 08/12/2010 17:37:00 | 1 | 0 | Can't get text to center vertical and horizontal in Android TableLayout | I have the following in a TableRow:
<ImageView
android:id="@+id/leftArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:padding="2px"
android:src="@drawable/left_arrow">
</ImageView>
<TextView
android:text="Current"
android:id="@+id/theScreen"
android:layout_width="wrap_content"
android:padding="2px"
android:typeface="monospace"
android:textStyle="bold"
android:gravity="enter_vertical|center_horizontal">
</TextView>
<ImageView
android:id="@+id/rightArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:padding="2px"
android:src="@drawable/right_arrow">
</ImageView>
The image in the ImageView is 26 pixels high. I want the text in the TextView to be centered both horizontally and vertically. It is centered but stays at the top of the box. I'm sure I'm overlooking something stupid...
Thanks!
| android | null | null | null | null | null | open | Can't get text to center vertical and horizontal in Android TableLayout
===
I have the following in a TableRow:
<ImageView
android:id="@+id/leftArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:padding="2px"
android:src="@drawable/left_arrow">
</ImageView>
<TextView
android:text="Current"
android:id="@+id/theScreen"
android:layout_width="wrap_content"
android:padding="2px"
android:typeface="monospace"
android:textStyle="bold"
android:gravity="enter_vertical|center_horizontal">
</TextView>
<ImageView
android:id="@+id/rightArrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:padding="2px"
android:src="@drawable/right_arrow">
</ImageView>
The image in the ImageView is 26 pixels high. I want the text in the TextView to be centered both horizontally and vertically. It is centered but stays at the top of the box. I'm sure I'm overlooking something stupid...
Thanks!
| 0 |
8,727,101 | 01/04/2012 12:45:57 | 976,847 | 10/03/2011 14:20:39 | 346 | 34 | Why the slider is not working? | My aim is to replicate the thumbnails to slide from left to right as per this page.
http://preview.vespercreative.com/citilogic/search_detail.php?pid=P2052
They key thing is I want the thumbnails to be on top. I managed to move the thumbnails on top using css but I can't get it to sroll from left to right.
**http://www.iamvishal.com/dev/sites/all/themes/andrewcustom/js/slideshow/index.html**
I am using the slideshow script http://www.electricprism.com/aeron/slideshow/
Any Help will be highly appreciated.
cheers,
Vishal | javascript | mootools | slideshow | null | null | null | open | Why the slider is not working?
===
My aim is to replicate the thumbnails to slide from left to right as per this page.
http://preview.vespercreative.com/citilogic/search_detail.php?pid=P2052
They key thing is I want the thumbnails to be on top. I managed to move the thumbnails on top using css but I can't get it to sroll from left to right.
**http://www.iamvishal.com/dev/sites/all/themes/andrewcustom/js/slideshow/index.html**
I am using the slideshow script http://www.electricprism.com/aeron/slideshow/
Any Help will be highly appreciated.
cheers,
Vishal | 0 |
7,238,500 | 08/30/2011 03:52:49 | 500,281 | 11/08/2010 03:16:27 | 376 | 8 | Totally confused with Ubuntu 11.04 | I have two VPS, one is Ubuntu 10.10, another is Ubuntu 11.04.
I am happy with the Ubuntu 10.10 but the 11.04 gives me headache.
I add some cron jobs in both of them, the same script. but the cron job on Ubuntu 11.04 wont work.
Here is some information:
root@localhost:lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Other output:
#ps aux
root 473 0.0 0.6 2276 832 ? Ss Aug28 0:00 cron
#mail
-bash: mail: command not found
#whereis cron
cron: /usr/sbin/cron /etc/cron.weekly /etc/cron.monthly /etc/cron.daily /etc/cron.hourly /etc/cron.d /usr/share/man/man8/cron.8.gz
#ls /var/log/cron
ls: cannot access /var/log/cron: No such file or directory
#ls /etc/syslog.conf
ls: cannot access /etc/syslog.conf: No such file or directory
Any idea why?
Thanks a lot!
| linux | command-line | ubuntu | cron | null | 08/30/2011 03:56:21 | off topic | Totally confused with Ubuntu 11.04
===
I have two VPS, one is Ubuntu 10.10, another is Ubuntu 11.04.
I am happy with the Ubuntu 10.10 but the 11.04 gives me headache.
I add some cron jobs in both of them, the same script. but the cron job on Ubuntu 11.04 wont work.
Here is some information:
root@localhost:lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Other output:
#ps aux
root 473 0.0 0.6 2276 832 ? Ss Aug28 0:00 cron
#mail
-bash: mail: command not found
#whereis cron
cron: /usr/sbin/cron /etc/cron.weekly /etc/cron.monthly /etc/cron.daily /etc/cron.hourly /etc/cron.d /usr/share/man/man8/cron.8.gz
#ls /var/log/cron
ls: cannot access /var/log/cron: No such file or directory
#ls /etc/syslog.conf
ls: cannot access /etc/syslog.conf: No such file or directory
Any idea why?
Thanks a lot!
| 2 |
7,805,053 | 10/18/2011 09:23:19 | 423,670 | 08/18/2010 06:47:45 | 4 | 0 | What's the difference beteen iwconfig and wpa_supplicant when configuring wireless network? | I am trying to configure a wireless network on Ubuntu Lucid.I find that **iwconfig** can do this job.But I also noticed that **wpa_supplicant** and **wpa_cli** utilities can also be used to establish a wireless connection.Can any one kindly explains the difference between them? | linux | null | null | null | null | 10/18/2011 12:10:07 | off topic | What's the difference beteen iwconfig and wpa_supplicant when configuring wireless network?
===
I am trying to configure a wireless network on Ubuntu Lucid.I find that **iwconfig** can do this job.But I also noticed that **wpa_supplicant** and **wpa_cli** utilities can also be used to establish a wireless connection.Can any one kindly explains the difference between them? | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.