All Questions
0
votes
0answers
2 views
Best method to parse an HTML document and replace whole segments of tags
I am trying to find the best way to parse an HTML document from top to bottom and
replace certain groups of tags for something different and create an updated file.
I prefer to use Java, VB.NET or ...
0
votes
0answers
2 views
Incrementing a char by an int
This is a practice C problem I am working on. Would a call of c[1] yield 'b'?
char* c = (char*) malloc(sizeOf(char)*27);
for(int i = 0; i < 27; i++){
char[i] = 'a' + i
}
0
votes
0answers
3 views
Dynamically importing constants from a module
I have a module which declares some constants like this:
FOO = "foo"
BAR = "bar"
and I want to access those global variables dynamically (i.e., by name) from another module
...
0
votes
0answers
4 views
Two seemingly identical LINQ queries. One works, the other doesn't
The query below works:
var result = (from p in db.Permissions
join z in db.PermissionOverridesByUsers on p.id equals z.PermissionID into x
from y in ...
0
votes
0answers
3 views
Windows 10 0x0000005D error
I am trying to install the Windows 10 Technical Preview to VirtualBox. However, when I try to install it, I get the following error:
Your computer needs to restart.
Please hold down the power ...
0
votes
0answers
2 views
Should I have multiple rabbitmq brokers to load balance work?
My application spins up a large number of EC2 machines with celery and rabbitmq installed. Currently I have all my machines acting as workers, with the exception of one machine solely acting as a ...
0
votes
0answers
6 views
Why the code is keep calling mmap and munmap?
I was trying to optimizing a C code. When I using strace to trace the program, I found it is keep calling mmap and munmap. But this code is just doing operation over memory elements allocated using ...
0
votes
0answers
3 views
How could I import SQLite Database into a android project properly
I am new in Android. I have tried several times but still could not compiled well. So I want to know why I just could not import the SQLitedatabase into the project properly.
Here is the helper File
...
1
vote
0answers
8 views
chmod 777 / -R (while sudo -i) logged in as root and have access to clone
Well, I am officially a huge idiot.
My fingers decided to betray me and press the enter key a moment too soon
I have no physical access to the device (which is needed urgently)
I do however, still ...
0
votes
0answers
3 views
Why is this lua gsub not working?
I have some lua code that is part of a rest api. I'm extending it to handle redirects.
However, I'm having trouble with a gsub.
msg=POST /v2/keys/message?recursive=true&value=hello%20world ...
0
votes
0answers
3 views
FancyTree: Node object is incorrect when dragged to root level
I am trying to define the new parent id for a node after a dragdrop event.
This function works fine assuming you drag a node to any level other than root
dragDrop: function(node, data) {
...
-1
votes
1answer
10 views
Method declaration on employee1 invalid need return type
I am getting an error on public static Employee1 saying it needs a return type required and that the method declaration is invalid. Ive tried changing it around but I don't know what I am doing wrong. ...
0
votes
0answers
4 views
TI-84 CSE GDP calculation
I am trying to create a program that will allow me to select a STATLIST (L1,L2,...) as variables and take L1 value one (L1,1) times L2 value 1(L2,1). Then sum that product with all values in the ...
0
votes
0answers
3 views
WebView on iOS keeps displaying shadow on my inputs
I'm using Bootstrap 3.0 and a WebView to display a form in my iOS app (iOS 8.0). However, despite all my attempts, the default textfield shadow keeps being displayed in my HTML form.
Here's what it ...
0
votes
1answer
12 views
How to upload an image file with html form and php?
Ok, So I am working on a website and I need to add profile pictures. How can I do this?
Right now here is
My html code:
<form action="profilepage.php" method="post"> Profile Picture: <input ...
0
votes
0answers
2 views
Access MediaElement.js Player Attributes
I need to access the properties of a MediaElementPlayer object, how can I do this? The website mentions you can access properties like currentTime and paused from the MediaElement object, but doesn't ...
0
votes
0answers
13 views
while loop to read from file skips first line
i have to read data from a file into a struct array line by line, but it skips the first line. i found somewhere else that because of the fgets and the sscanf combo the 2nd line is the first read, but ...
1
vote
0answers
12 views
angularjs $httpProvider interceptor documentation
I am new to angular (and programming), here is a seemingly simple question but I could not figure it out.
some tutorials suggests using $httpProvider.interceptors.push('interceptorName') to ...
0
votes
2answers
16 views
How can I convert the string of a javascript object literal to a javscript object literal?
How can I convert the string...
"{ name: 'John' }"
...to an actual javascript object literal that will allow me to access the data using its keys (i.e. varname["name"] == "John")? I can't use ...
0
votes
0answers
5 views
Page binding does not work in Textbox Text
In my Hub page, I can nagivate to my ItemPage like this:
private void ItemView_ItemClick(object sender, ItemClickEventArgs e)
{
// Navigate to the appropriate destination page, ...
0
votes
0answers
7 views
How to get Anchor tag (which works with JS function call) to work using rightClick > open in new tab?
I'm using an anchor tag
<a href="#" onClick="javascriptMethod();">asdasdasd</a>
This javascript function dynamically decides on the page to open. Works all right on click.
But when I ...
0
votes
0answers
5 views
Is there a way to push events to the front of the event queue?
In order for my application to be consistent with a design pattern i'm experimenting with, i'll need a way to push SDL_Events to the front of the event queue. In my specific case, these specific user ...
0
votes
0answers
13 views
Deciphering My Cipher: Python Wizardry
I'm trying to write a function decipher(s) that takes an enciphered string where the characters have been rotated, and returns the original English string. An example:
>>> decipher('Bzdrzq ...
0
votes
0answers
7 views
iOS - detect software keyboard height
I'm using the new simulator with iOS7 and iOS8. Cmd-K toggles the software keyboard - to simulate hardware keyboards. What's the best way to detect whether the software keyboard is displayed?
I've ...
0
votes
0answers
10 views
Text input as variable for array with a while loop on javascript
I am trying to figure out how to make a text box number reflect the number on the array i am trying to show. My code in attached. I am trying to make it that if i type "4" then 4 of my skills would ...
0
votes
0answers
6 views
GIT - Rewrite authors of commit history
I have a git repo that I migrated from CVS with Author name / email mismatches. Is there a way (with out screwing up the hash of each commit) to rewrite the authors of the previous commits to unify ...
0
votes
1answer
8 views
Set Windows Forms Background Color To Hex Value
I am simply trying to set the background of a Windows Forms window to a hex color value, eg, "#626262."
I cannot seem to find any simple way to do it.
Is there a simple way to set the background color ...
1
vote
0answers
10 views
What is the right way to organize class contents?
While I was designing a bunch of classes, I found myself wondering if there is a standard for where to place these relative to each other:
private $property
public $property
public static $property
...
0
votes
0answers
3 views
ElasticSearch bulk operation - omit response
I was just wondering if there was any parameter / method to make a bulk request through the ElasticSearch REST api without a response being returned.
Trying to squeeze as much network performance as ...
0
votes
0answers
2 views
How can I retrieve the props which were used to create this actor
I create this actor:
ActorRef eventActor = system.actorOf(Props.create(EventActor.class,1),name);
Now, I want to retrieve the props 1, but I can´t. Can you help me??
0
votes
0answers
4 views
Need to do a total Ubuntu Backup
BEfore you say this is a duplicate, let me say I saw this How to do a backup of files using the terminal? but I am not sure about a few things.
For one thing, when I say I need to backup everything, ...
0
votes
0answers
3 views
Save Log File in Azure
In summary
I want to capture this in a text file in azure
Console.WriteLine("Message");
Long text:
well my question today is how to save a log file in the blob storage in azure
I used to have ...
0
votes
0answers
4 views
In ExpandableListView, how to make the first child focused instead of last child when Expanded
I've been searching and digging, but I haven't found any solution.
I found one thread in S/O suggesting
expandListView.expandGroup(0);
expandListView.setChildSelected(groupPosition, 0, true);
...
0
votes
0answers
2 views
Transform Regular Expression to NFA and transform NFA to DFA
My code is not working, I know that there is an infinite loop at the level of the class Machine.java
There is an infinite loop at the level of the line: while (X.trans.size() ...
0
votes
0answers
3 views
Wordpress - list all pages in a hierarchy
How does one list all the pages in WP, so that they form a hierarchy?
Home
Sub page
Other page
About Us
About us subpage
Lorem ipsum
Sub sub page
I need this for main site ...
0
votes
0answers
12 views
Fill in missing values by group in data.table
If one wants to fill in missing values of a variable based on previous/posterior non NA observation within a group, the data.table command is
setkey(DT,id,date)
DT[, value_filled_in := ...
0
votes
0answers
2 views
How to enumerate and close all open sockets in a windows process
I have a DLL running in a process, I'd like to enumerate all open sockets and then close them. From messing around with Process Explorer I need to close all file handles with the name \Device\Afd.
...
0
votes
0answers
17 views
Possible to make g++ compile to memory?
Is it possible to make g++ compile to RAM, then run the resulting executable from RAM, instead of from the HD?
0
votes
0answers
17 views
Using Functions In C
I'm running into an error when I try to scan the value entered into income, what's wrong with this code? I think it has something to do with using income twice, I could simply change the name of the ...
0
votes
0answers
2 views
Metadata attached to map compressed with Nippy disappears from Langohr message
I have a map that I'm compressing with Nippy and sending via Langhor. The map decompresses just fine on the other end, but any metadata attached to the map is nil on the receiving end. Any ideas as ...
0
votes
0answers
4 views
Multiple nested selects in mysql is returning a buffing error
I may be going about this the wrong way. I am trying to find a conflict in scheduling and need to query two tables to do so. This is what I am doing do far.
event_positions:
...
0
votes
0answers
9 views
Another Bash Script Help Please
Does anyone know of a script or program that could help me sort my files?
I have 30k+ images and many folders that hold these images what I would like is to have 100 images per folder so does anyone ...
-1
votes
0answers
4 views
Wordpress Plugin that refreshes date of post by day of the week?
I developed a wordpress site for a nightclub and like most nightclubs, the venue has the same weekly events that happen every Thurs., Fri., Sat., Sun.
The current setup for the homepage pulls posts ...
0
votes
0answers
9 views
Can I use a strict filter in angularjs to search in all pages?
I've got a problem while developing a pagination div and trying to search using strict data. What I want to do is to search across all the pages, not only the actual one. Sorry if my english is bad, ...
0
votes
0answers
8 views
Force launch orientation for an app supporting all orientations
I have an iOS8 app that I need to support all orientations while playing the game, but while in the menus, is portrait only. I want the app to launch using only the portrait image, so it matches the ...
0
votes
0answers
4 views
Declare variable whose type is a function's return type
I'm currently using a type alias:
type FooType = Int
val foo = (_: Int) * 2
def takeFooRet(x: FooType) = ...
however, I'd like to do something like:
val foo = (_: Int) * 2
def takeFooRate(x: ...
0
votes
1answer
17 views
K&R's C Program pg. 17 Line Counting Program results always 0
I have been reading K&R's The C Programming Language. When I typed in the example program on page 17 to count lines, the program always results are always 0. Here is my code:
/* Taken from The C ...
0
votes
0answers
4 views
Setting a before_action based on a conditional statement within a method
I have a controller that sorts the order of objects based on their numeric position:
<%= form_for @subject do |f| %>
<p><%= f.label :position %></p>
<p><%= ...
0
votes
1answer
22 views
Why does my try/catch block keep looping?
When I run this, the code skips over input.nextInt(); and goes in circles:
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// Link user to programs (ToC)
...
0
votes
0answers
5 views
Input documents to LDA
Assume I have N text documents and I run LDA in the following 2 ways,
run LDA over the N documents at once
run on each document separately, so for N documents you run the algorithm N times
I'm ...