instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am having difficulty setting up a struct from the pcap library in FFI.
Struct:
struct pcap_if {
struct pcap_if *next;
char *name;
char *description;
struct pcap_addr *addresses;
bpf_u_int32 flags;
};
The relevant Ruby code
module Pcap
extend FFI::Library
ffi_lib 'pcap'
attach_function :pcap_findalld... | stackexchange/codereview |
I have Activity for displaying search results. It extends ListActivity. I need to show search results in listview grouping several items. So, how do I add grouping to my listview?
| stackexchange/codereview |
I want to maintain version control in following application so what will be best option for maintaining version?
In my app there is tool which will generate resources as input for my frame work.
For the sake of simplicity we can take a eg like in tool there are same options so one can set some values over there.
Just ... | stackexchange/codereview |
i have a multi environment program that runs on windows ce machines, regular pc and windows mobile.
I am using a database and files.
because of the windows CE i need to use the Directory.GetCurrentDirectory() func before the file use and then reset the current directory (using the Directory.SetCurrentDirectory() func) ... | stackexchange/codereview |
I want to be able to test my location-based WP7 app. How to do this on the phone simulator?
Do we have to create some kind of mockup location data first? or is there any framework available to do this?
thanks
| stackexchange/codereview |
I'm learning OSGi and I'm curious about the following situation:
I want to change (extend mostly) an interface exposed by OSGi, without changing the classname. Is it possible make a bundle that "translates" the old interface to the new.
Below is an example, I hope it is clear enough, just by making use of a few manifes... | stackexchange/codereview |
How to disable scrolling for UITableView header, to be always visible? (To have column titles.)
| stackexchange/codereview |
Hi in my java project we have extjs grid. while i increase data in grid pannel automatically vertical scrollbar will come.if the data is small amount the scrollbar will not appear. but the space of scrollbar is appeared in my grid. What i need is while data amount is small it shouldnot show scroll bar and scrollbar spa... | stackexchange/codereview |
I'm using the datastore of the Google App Engine (DataNucleus). I have two classes, one Chat and one Rating. A chat can be rated more then ones so I created an one-many relationship by adding a list to the Chat class.
Now I want to know the number of unrated chats, so I did the following:
int numberOfChatsInStock = 0;... | stackexchange/codereview |
I can't seem to find how to generate the classic Facebook Connect button:
all I can find how to generate is the following:
I'm using the documentation here http://developers.facebook.com/docs/guides/web
Any ideas? :)
| stackexchange/codereview |
The task: create an image from a PDF file as fast background preview for my PDF displayed with the CATiledLayer (slower, higher resolution).
Problem: I get pretty fast an error warning on my iPad "Received memory warning. Level=1" and shortly after "Received memory warning. Level=2" .. then the app crashes.
- (void) d... | stackexchange/codereview |
I have a couple activities in my app that I would like to utilize shared preferences. Initially, I created a method in each activity to utilize SharedPreferences, which worked fine. However, since there are multiple activities that use the same data, I’m basically tucking similar methods in multiple places. So it se... | stackexchange/codereview |
I manage a rather large traffic website. On each page we keep track of a visitors online by running the following code. We then have a cron which deletes the records which are older than X minutes.
if(!isset($_SESSION[users_online_id])) {
if(!(date('H')=='02' && date("i") >= 37 && date("i") <= 45)) {
# NEW VISITOR -... | stackexchange/codereview |
so after debugging for awhile I've come to this in my program. It's supposed to copy name into a circular array for a queue. I am not exactly sure what I am doing wrong here and could really use some help.
qPtr->front is an int
qPtr->numElements is an int
qPtr->queueSize is an int
name is a string
strcpy(qPtr->name[... | stackexchange/codereview |
I just downloaded the software and am trying out the emulator and I am surprised that it isn't obvious (to me) how to tab to the next enterable field.
The EN key means "English", not enter.
The bottom rightmost key IS the ENTER key, but that performs a submit of the page and strangely, results in the whole page being z... | stackexchange/codereview |
Say I have a webpage containing a 200x200 image. At coordinates 50,50,150,150 (x1, y1, x2, y2), say I have the letter "A".
How do I do the following in CSS:
Overlay the image with the character "A" starting at the coordinates x1, y1?
Size the text such that it fits x1, y1, x2, y2?
Make the text invisible (but still on... | stackexchange/codereview |
As the title says ... I have tried to use the following code to execute a PHP script when user clicks a button in my Java Swing application :
URL url = new URL( "http://www.mywebsite.com/my_script.php" );
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
But nothing happens ... Is ther... | stackexchange/codereview |
So far I was using twitterjs, but it doesn't show retweets from my timeline. So I'm just looking for an alternative able to show retweets.
Thanks
| stackexchange/codereview |
I had Login form ,and I added check box for remember me ,I did my code well but when I check rememeber me check box it rememeber only user name only.so please any one help me.
protected void CBRemeber_CheckedChanged(object sender, EventArgs e)
{
HttpCookie MyCookie = new HttpCookie("MyCookie");
boo... | stackexchange/codereview |
I have built the Poco C++ library on Mac. When inspecting the built output files I notice that their load paths are absolute paths that point to the build directory. For example:
$ otool -L libPocoFoundation.dylib
libPocoFoundation.dylib:
/Users/francis/orig/poco-1.3.6p2/lib/Darwin/i386/libPocoFoundation.9.dylib (c... | stackexchange/codereview |
I need to extract text (word by word) from a pdf file.
import java.io.*;
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.*;
import com.itextpdf.text.pdf.parser.*;
public class pdf {
private static String INPUTFILE = "http://ontology.buffalo.edu/ontology%28PIC%29.pdf" ;
private static String OUTPU... | stackexchange/codereview |
I'm already aware of using \b and \r to move back one character and to the beginning on the line respectively. But is there a way, (specifically in python,) to move the cursor position up 1 line? I'm trying to avoid using curses, but if this is the best option then so be it.
| stackexchange/codereview |
I would like to code a REST based HTTP API which is accessible from .NET and any other language like for example Python.
Should I use WCF for this? Or will that make the other languages harder to interop with my API?
I want the server to carry no state at all, and I want to be able to take advantage of HTTP persistent ... | stackexchange/codereview |
I have one issue related to JTree swing component,
I want to use JTree under Windows high contrast Mode, but it never shows tree nodes according to windows High contrast theme.
Jtree view Under Normal Mode
Jtree view Under High Contrast Mode
Eclipse Package Explorer view Under Normal Mode
Eclipse Package Explore... | stackexchange/codereview |
Now I am working with my friend, he is Vietnamese and he wants to create a website using the Vietnamese Language, but we have a problem with Encode UTF-8.
I wrote a Filter class as follows:
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
impo... | stackexchange/codereview |
Greetings,
I'm trying to understand why I'm seeing the entire file loaded into memory with the following program, yet if you comment out the line below "(***)" then the program runs in constant (about 1.5M) space.
EDIT: The file is about 660MB, the field in column 26 is a date string like '2009-10-01', and there are o... | stackexchange/codereview |
I want my (readonly,fullrowselect) datagridviews to have no selected rows when the form is loaded. I tried .ClearSelection in the forms constructor after setting their datasource but it doesn't work (i would really like to know why...).
Then I tried in the Form_load event but it won't clear the selection on the datagri... | stackexchange/codereview |
Hypothetical: I find a page with a button ('#bigButton'), that when clicked causes a llama ('img#theLlama') to show() using jQuery.
So, somewhere (say, Line 76) in buttons.js:
$('#bigButton').click(function(){
$('img#theLlama').show();
})
Now, let's say I have a big HTML page with a whole bunch of .js files included.... | stackexchange/codereview |
I would like to expire all my sessions in Tomcat. We test our product under Fitnesse and some sessions remain and the end of the session causes dependency between the tests. I do it by hand with the following code, but some sessions remain (I can check it with the http://localhost:8080/manager/html/list url)
public sta... | stackexchange/codereview |
I have a list of Strings, and I want to concatenate them with spaces in between. So I'm using StringBuilder. Now if any of the Strings are null, they get stored in the StringBuilder literally as 'null'. Here is a small program to illustrate the issue:
public static void main(String ss[]) {
StringBuilder sb = new St... | stackexchange/codereview |
SELECT au_lname, au_fname
FROM authors
WHERE au_lname = 'Green '
au_lname au_fname
---------------------------------------- --------------------
Green Marjorie
SELECT au_lname, au_fname
FROM authors
WHERE au_lname LIKE 'Green '
au_lname ... | stackexchange/codereview |
$(function () {
var sr = 'section.row';
var fot = 'figure.one_third';
var pA = 'div.portfolio ul li a';
var item = ('sr fot pA');
$item.addClass('blue');
});
http://jsfiddle.net/G8yJj/13/ <<
| stackexchange/codereview |
The online documentation says
Hash[expr]
gives an integer hash code for the expression expr.
Hash[expr,"type"]
gives an integer hash code of the specified type for expr.
It also gives "possible hash code types":
"Adler32" Adler 32-bit cyclic redundancy check
"CRC32" 32-bit cyclic redundancy check
"MD2" 128-bit... | stackexchange/codereview |
What concepts etc in perforce are different from svn in ways that are likely to give me problems?
(I am not interested in witch is best, as it not for me to decide what system my new employer uses)
| stackexchange/codereview |
I have the next xml layout file:
<ViewFlipper android:id="@+id/details"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- ListView que define la lista de noticias -->
<ListView
android:id="@+id/list"
android:cacheColorHint="@android:color/transparent"
... | stackexchange/codereview |
I need to be able to create a new site collection from one SharePoint 2010 farm to another. I.e. the user fills out the forms associated in SharePoint Farm 1 and creates a site collection with the specified info in SharePoint Farm 2.
I have considered the following alternatives:
Using the Client Object Model (COM), bu... | stackexchange/codereview |
I use visual studio 2005 and now my team wants me to try my hand at some testing frameworks for asp.net websites.I'm completely new to testing. I want to know what kind of automated testing can I do.Can I test my business logic,Can I test my UI.I just started using NUnit and I am getting a hang of it. For Web UI testin... | stackexchange/codereview |
I compiled the following little application only I want all the textpoxes cleard when the tabs areswitched by the user how can this be achieved?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim FILE_NAME As String = "C:\test.pgp"
... | stackexchange/codereview |
I have the same problem as these guys:
Spring Annotation-based controllers not working if it is inside jar file
http://forum.springsource.org/showthread.php?t=64731
...but the difference is that I use Maven 2 as a build tool.
How do I achieve the same effect using Maven 2?
I saw this solution to creating a classpath en... | stackexchange/codereview |
I am making a simple BBS system with ruby on rails3.
3 main modesl are Members/Categories/Articles.
Article belongs to Members/Categories, (member_id/category_id columns in db table)
and each member/category 'has_many' articles.
When a specific user tries to write an article, I tried it by
def new
@article = current... | stackexchange/codereview |
Im new to silverlight and i want the procedure of how to upload file on ftp in silverlight 4 application, Im using C#. So far i know that there are two procedure of doing this one is web client object and other is HttpWebRequest but i want to know if it is possible to upload a file to ftp server and how to do this?
| stackexchange/codereview |
I try to write my first widget application and i got a problem. So, i have 2 arrows: switch to left and switch to right. For both of them I want to use a single Service, which changes the view of my homescreen widget according direction of arrow. For distinguish the direction of arrow i put an extra data to each intent... | stackexchange/codereview |
Are there any .net REST libraries which support Windows Phone 7 and silverlight?
| stackexchange/codereview |
Is there a way i could bundle virus protection(a kind of virus shield) for my final .exe?
| stackexchange/codereview |
Using the Indy10 components for delphi, I am grabbing the source of a webpage and displaying it in a Memo control using the following code.
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text := IdHTTP1.Get(Edit1.Text);
end;
When the page I am trying to display is just a normal page (ie. no login requir... | stackexchange/codereview |
I have this ReGex expression in JavaScript right now: /(.*)(,)([\]\}]+)$/.exec(stringData).
Basically it's removing any trailing comma from a malformed JSON string, (by concatenating r[1] + r[3] you get it).
It's working well except it's way too slow on big strings. So a regex is not a good choice here. I would like to... | stackexchange/codereview |
how to stop adding tabbed panel within a tabbed panel in Netbean IDE 6.8.
i want to add a frame in a tabbed panel but whenever i do, it creates another tabbed panel frame in that main tab. what should i do?
plz help
thanks.
| stackexchange/codereview |
I am using Rails 3.0.1, Bundler 1.0.3 and Ruby 1.9.2p0 (2010-08-18 revision 29036). Everything was fine and fast until I started adding Devise & Omniauth. From that on everything involving initializing Bundler (calling Bundler.require as in application.rb) took ages (by means of 30-50 seconds which is a lot for e.g. ca... | stackexchange/codereview |
i m writing a code for port scanner so i need to send a raw packet.
i searched and found out that using dpkt library would be better but i didnt find any documentation that would help. So please anyone could help may explaining how to create a packet with customized TCP header i.e set the flags of tcp header as require... | stackexchange/codereview |
I am looking for the most efficient way to update a table in the following way.
If field A has a value in it and the contents of field b are being removed (null)then just update field b to null.
If field A has no value in it and field b is being updated to null then delete row.
I'm a MYSQL newbie and am aware of insert... | stackexchange/codereview |
What is the difference between these types of comments in ASP.NET's ASPX markup page?
<%-- something here --%>
and the html comment
<!-- something here -->
| stackexchange/codereview |
I'm pretty new to XSLT and have an urgent work requirement that I'm finding quite complex to sort out.
I have an XML doc which needs an attribute adding under certain conditions.
The XML doc is pretty straightforward:
<A x="foo" y="bar" z="">
<B/>
<C/></A>
Basically if attribute "z" is present. Then a new attribute n... | stackexchange/codereview |
I have read the topic Mysql query: retrieve current date query ., but my question is how can i select the row in a particular given time span.
i.e if my date field is having the entry as 2010:10:27 10:30:00 then that row should be selected when the current time reaches 2010:10:27 10:00 and until the current time reache... | stackexchange/codereview |
I am pretty new in builders and absolutely newbie in FinalBuilder.
It is a great app, very intuitive, well documented with lots of features.
But I can't find one thing:
How can I determine who is responsible for the broken build?
| stackexchange/codereview |
I'm new to Unity, but this question is more generic to IoC, and I’m pretty new to implementing IoC as a whole. I have VS2010 solution with this project structure (simplified slightly):
Business Objects – Folder
DomainModel (Class Lib prj.) – Entity Framework 2 POCO entities
Data Layer – Folder
DataAccess (Class Li... | stackexchange/codereview |
Why doesn't this work?
for i in [a, b, c]:
i.SetBitmap(wx.Bitmap(VarFiles[str(i)]))
I get:
Traceback (most recent call last):
File "<string>", line 11, in ?
File "codecc.py", line 724, in ?
app = MyApp(0) # stdio to console; nothing = stdio to its own window
File "C:\Program Files (x86)\WorldViz\Vizard... | stackexchange/codereview |
A coworker had never heard of this, and I couldn't provide a real definition. For me, it's always been an instance of 'I-know-it-when-I-see-it'.
Bonus question, who originated the term?
| stackexchange/codereview |
I'm trying to build a generic worker thread in Delphi, one that I can pass a function/procedure (doesn't matter) as an argument and let it execute.
My guess is to add a field in the TThread class and call it from TThread.Execute.
So the code outside the thread is gonna be:
MyThread := TWorkerThread.Create(True);
... | stackexchange/codereview |
I'm trying to find people via Twitter API.
I use urls like this: https://api.twitter.com/1/users/search.json?q=some@email.com
But there's a problem. For example, when I search by email "blablabla@gmail.com", twitter responds to me with all account than have "gmail.com" in their email. So I can't find even myself.
Ho... | stackexchange/codereview |
Anyone knows how, or any libraries that can be used?
Thanks in advance!
char * base16Str="1234567F";
char * base256Str;
| stackexchange/codereview |
I have just finished reading an article on MSDN by John Evdemon. He bashes the CRUD interfaces and calls it an anti-pattern.
While I agree that having ANYTHING stateful is difficult and Current and MoveNext are bad ideas I don't agree that CRUD as in Create Read Update and Delete are bad. If I have a car service and I ... | stackexchange/codereview |
How to redirect it as follows?:
mysite.com -> mysite.com/index.php
mysite.com/index.php -> mysite.com/index.php
mysite.com/index -> mysite.com/index.php
mysite.com/main.php -> mysite.com/index.php
mysite.com/main -> mysite.com/index.php
Same with .html extension (ie. mysite.com/index.html -> mysite.com/index.php)
| stackexchange/codereview |
I have a 70 by 50 px box and I have various images, (SVG files, so no size) I want to keep their aspect ratio, but some images are portrait and some are landscape sized. So I can do:
background-size: 70px auto;
and that will work for all the landscape icons. But it will stretch the portrait images and make them taller... | stackexchange/codereview |
I have a mysql database which has 3 tables that have to be joined together. I receive smaller databases that must feed this mysql database, appending the new data as I get it. The problem I have is the smaller dbs that I get are generated by an outside application and are not really meant to be used all together. Th... | stackexchange/codereview |
I am implementing some spectral graph algorithms for a project. A large part of this is finding eigenvalues and eigenvectors of large, sparse matrices, as well as multiplying matrices.
My question is, what are the fastest libraries that do this? I've been looking at NumPy for Python or JAMA for Java. Are these goo... | stackexchange/codereview |
I know this exists in other languages, but I want it for Python to I can send emails that'll show up in GMail, etc.
| stackexchange/codereview |
I have an F# code computing liquid flow. The code consist of 2 projects. The core library and project to run simulations. When I run a parametric study like
open CoreLibrary
for lbmViscosity in [0.1] do
for Re in [0.001; 0.5] do
for lbmD in [6.;5.;4.;3.;2.5;2.;1.5;1.;0.8;0.6;0.4;0.2] do
simulation setup
... | stackexchange/codereview |
I'm having separate select boxes for day, month, year validation.
12 ...
JanFeb ...
20092010 ...
If I use jquery validation plug-in, it displays separate error messages for each fields if it not selected.
But I want to treat all the three as a single field, and display error message.
if day is selected and month and... | stackexchange/codereview |
This just jumped into my head and I can't figure it out.
If I have a code like this:
struct A { char x[100]; };
struct B { int data; };
struct C : A, B {};
#include <iostream>
using namespace std;
B* get_me_some_stuff()
{
static int x = 0;
if (++x % 2 == 0)
return new B();
el... | stackexchange/codereview |
When an application such as a web server sends HTTP data to a web browser, how does the browser know when it has received all of the data so that it can begin using it instead of waiting for more? TCP doesn't specify anywhere how large a segmented message is going to be.
Right now I'm thinking that it's up to the appl... | stackexchange/codereview |
I'm working on a related decidability/recognizable problem, and to solve it, I need clarification about the encoding/representation of a turing machine.
I know a turing machine is formally defined as a 7-tuple. If I have a Turing Machine U and another Turing Machine M, is it trivial to design U to recognize some part ... | stackexchange/codereview |
I have the following method:
private DataTable getsortedtable(DataTable dt)
{
dt.DefaultView.Sort = "Name desc";
//I would need to return the datatable sorted.
}
My issue is that I cannot change the return type of this method and I have to return a DataTable but i would like return it sorted.
Are there any mag... | stackexchange/codereview |
I need to hook up all events in an application and trace all information (raising, arguments, etc.).
I found this at Stackoverflow:
Tracing all events in VB.NET
However, I need a solution that not only writes the called event to console, but calls TraceVerbose with parameters showing sender and eventargs.
I am still ... | stackexchange/codereview |
Any one help me to debug Crash Logs.Thanks in advance.
Regards,
| stackexchange/codereview |
I'm learning Java and OpenGL ES for Android by reading tutorials and applying what I already know. And I have now hit a brick wall when it comes to rotating an object.
Rotating a cube by touching the screen is no problem. But if I rotate the cube 180 degrees up or down, then when I now try to rotate the cube left or ... | stackexchange/codereview |
I have requirement in SPDesigner.
There are list of options in a drop down. There is one more drop down in the same form.
Depending on the first drop down some of the options should be removed from the second dropdown. Depending on other options some other options have to displayed.
First drop down:
<select id='firstdr... | stackexchange/codereview |
I have a setup like this...
$(document).ready(function(){
var model = { /* some variable names */, Traits[] };
var traits = // json array pulled from server.
$('input[type=checkbox]').button(); // jquery ui button control.
});
Now, in my HTML, I have a jQuery Template like this.
{{each(i, trait) traits}}
<i... | stackexchange/codereview |
I have trouble with receiving of email from from my SMTP to internal (the same domain) email.
I mean that when I sent email from my registration@example.com email to private email somename@yahoo.com this email was delivered. But when I sent from registration@example.com to info@example.com this email was not delivered... | stackexchange/codereview |
I am trying to use the form tag within a Spring Roo JSPX file: But everytime I run the application, I keep getting the following exception:
The prefix "form" for element "form:form" is not bound.
I have the form tag library included (xmlns:form="http://www.springframework.org/tags/form"). Can anyone help me get start... | stackexchange/codereview |
I am trying to get a very thin border for my table (table rendered from a GridView). I have set the BorderWidth="0" for the GridView and then through CSS I am creating the border for the rows that I need. Here I don't want any border around the grid header. HTML code for grid renders to table and TRs. So I ahave the fo... | stackexchange/codereview |
I have nginx installed (was using it for Ruby on rails with passenger).
What do I need to get this to work for PHP now?
| stackexchange/codereview |
I'm creating a small image upload validator for this printing company, they need to make sure that an uploaded image has a color space of either CMYK or PMS.
This is what I'm using right now:
Image img = Image.FromStream(fupFile.PostedFile.InputStream);
ImageFlags flags = (ImageFlags)Enum.Parse(typeof(ImageFlags), img.... | stackexchange/codereview |
What are some of the common strategies used for data access?
Can LINQ be called a strategy?
| stackexchange/codereview |
I am instantiating an editable QLabel like so:
QLabel foo("some text");
foo.setTextInteractionFlags(Qt::TextEditorInteraction);
I can click the text and modify it, and the modified text must be in a buffer somewhere, but even after examining the data fields in Qt Creator I don't see where it is:
QString notmodified = ... | stackexchange/codereview |
I've got HTML code like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title></title>
... | stackexchange/codereview |
I'm building a site that uses w3c CORS to make oAuth-signed HTTP requests to a remote server. Mozilla has a great document explaining how to make and receive CORS requests, and there's good support in firefox, chrome, and safari.
Does anyone maintain a matrix of browser support for CORS features (e.g. preflight OPTION... | stackexchange/codereview |
I tried to simply new up a different controller and then calling the action method. The return value is of type ViewResult and the model was created, but the View is null. I guess the context in which the runtime tries to find the correct view is wrong.
How can I achieve this?
Background
Trying to see if a template con... | stackexchange/codereview |
this question is for the JS experts out there.
I use this next piece of code to get all the JavaScript function names which exist under the dom root.
for(var x in window){
val = ""+window[x];
if(startsWith(val,"function")){ //only functions
alert(val)
}
}
While this code works... | stackexchange/codereview |
I need to maintaing the Session throughout the day? On or before session expires, how do I enforce session throughout the day without giving any session timeout either in IIS or web.config?
Note: Default Session Timeout in IIS – 20 minutes.
Thanks in Advance
| stackexchange/codereview |
My application is running on CentOS 5.5.
I'm using raw socket to send data:
sd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
if (sd < 0) {
// Error
}
const int opt_on = 1;
rc = setsockopt(m_SocketDescriptor, IPPROTO_IP, IP_HDRINCL, &opt_on, sizeof(opt_on));
if (rc < 0) {
close(sd);
// Error
}
struct sockaddr_in sin;
... | stackexchange/codereview |
I have a file of the following format:
ID1 { some text }
ID2 { some text }
They don't have to come line by line format, so that we can have:
ID1 { some [crlf]
text [crlf]
}
ID2 [crlf] { some t [crlf]
ex [crlf]
t}
and so on, meaning some text can be more than one line and there could be a CRLF immediately following I... | stackexchange/codereview |
I'm looking for a very simple way to implement fibers in Python. I'm sure there's a really simple way to do it using generators, but my mind is crapping out on me. This isn't for a huge application, so I don't need the fanciness (or the overhead) of something like Diesel or Tornado or Twisted, I just want a neat little... | stackexchange/codereview |
I have been going through a few published papers which details algorithms and data structures which can be used for implementation of a thread library. I searched online to view any existing implementation of the same, and I could only find LFThreads(only its documentation, not its source code).
Have any of you worked ... | stackexchange/codereview |
I am able to create a time-series "hash" using the statistics gem:
=> #<OrderedHash {"2010-10-23"=>2, "2010-09-22"=>3, "2010-09-11"=>1, "2010-08-27"=>1, "2010-10-15"=>
1, "2010-09-15"=>1, "2010-08-08"=>2, "2010-10-17"=>14, "2010-10-06"=>2, "2010-09-28"=>1, "2010-10-19
"=>1, "2010-09-20"=>1}>
I want to create a simple ... | stackexchange/codereview |
I just configured @PersistenceContext(type=PersistenceContextType.EXTENDED) on my DAO classes to get lazy loading working on the view layer (needed to get it not closing the session for this) but I am having issues with 1 level cache (I imagine).. Because the object is cached even with my second level cache settings of... | stackexchange/codereview |
i have a array of strings i want to write a query such that
first it will count the Id from a particular table say products on the basis of first product names that is in the array
if the value is more than one then select the top one id from the list randomly
otherwise if the count comes one or zero then perform the... | stackexchange/codereview |
I'm using linq to sql. And do something like:
IEnumerable<VarValues> parameters = GetDayParameters();
protected IEnumerable<VarValues> GetDayParameters()
{
return "some linq query";
}
After that, i'm using LINQ to Objects for "parameters"-variable, in loop, and that queries start to connect to database.
Question ... | stackexchange/codereview |
I have a table with records for each zip code in the united states. For the purposes of displaying on a map, I need to select X random records per state. How would I go about doing this?
| stackexchange/codereview |
I am using VS 2010. My app is ClickOnce deployed. My three Prerequisites are CR 2010 and both the .NET 4.0's.
When i run the ClickOnce the CR 2010 prerequisites runs first, but it requires .NET to be on the machine to be successful. I need this ClickOnce to first install .NET 4.0 THEN CR 2010. Seems like a simply pr... | stackexchange/codereview |
I'm making models for games. In 3ds Max there was "polygon cruncher" plugin for reducing number of polygons.
Is there something similar for Maya? Or is there any other way to do that?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.