instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm using Microsoft Chart in order to draw some stepline charts. Should I use StepLine directly or should i make my own using FastLine in order to be faster ? In other words, do anyone know if the stepline is built on the Line or on the FastLine type. I've got around several thousands points to draw. StepLine : http://...
stackexchange/codereview
I am currently developing an application and decided to try Admob ads. Unfortunately, after following Admob's guide (pretty simple one, good job on that) I get no ad, whether I run it on the emulator or on my phone (HTC Desire). The weird part is that the ad has shown a couple of times (I really mean just a couple of t...
stackexchange/codereview
I have heard that when you have a subclass, you are supposed to initialize the superclass with the same init function from within the subclass's init. What I mean is that the subclass's init should call [super init] and the subclass's initWithFrame should call [super initWithFrame]. Why is this? Why does calling the...
stackexchange/codereview
i have a Flash Application with a button and an onRelease event. How can i load an external swf File, display it for 5 seconds on top of the main stage and then fade it out? Will this be possible with createEmptyMovieClip()?
stackexchange/codereview
This question is about how to create an SHA-1 hash from an array of data in C using the OpenSSL library. It returns an array of 20 bytes, containing the hash. Is there some standard way of representing that data in string form, not binary? If so, is there a function in OpenSSL itself to convert to said string format? I...
stackexchange/codereview
I have this Stored procedure on my sql server : [InsertRecord] @param1 varchar(10), @Param2 varchar(50),@Param3 varchar(10)=NULL, @Param4 datetime = NULL AS BEGIN When I update it with the following code : connenction = pymssql.connect (host=host1,user=user1,password=password1,database=database1) curser = con...
stackexchange/codereview
I stumbled upon this piece of code to get current time in EST with daylight saving. It seems to work fine, when checked on the internet by the time displayed in sites providing current time in EST with daylight saving. SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss.SSS"); dateFormat.setTi...
stackexchange/codereview
I have an array/list/collection/etc of objects. For sample purposes, lets assume it is just a string array/list/collection/etc. I want to iterate through the array and split certain elements based on certain criteria. This is all handled by my object. So once I have the object index that I want to split, what is th...
stackexchange/codereview
I'd like to develop a web sample application that can send and read audio on the fly. The idea is to develop a website with HTML5/JS. So, the admin part (in php or whatever server side language) will allow me to send audio from a mic. Then, on the client side, the user can listen to the stream with the <audio> tag for ...
stackexchange/codereview
A stickman is defined as a set of points, a set of lines between certain points, and other simple shapes (like a circle for a head). It looks to me like the easiest route in AS3 is to use a Shape/Sprite's Graphics property to draw these lines, clearing and re-drawing each time the stickman changes. But some of the newe...
stackexchange/codereview
I'm currently developing a web-tv application that uses MPMoviePlayerViewController resp. MPMoviePlayer to playback streaming video content on the iphone. the issue I've got here is that once i unplug my headphones (while watching tv) the player stops. Due to the fact that I'm not showing the standard controls (previou...
stackexchange/codereview
When working in the ocaml or ghci toplevels I often build up a significant "context" for want of a better word, values bound, functions, modules loaded, and so on. Is there a way to save all of that and reload it later so I can continue exactly where I left off? Or better yet, dump out the entire lot as a text file tha...
stackexchange/codereview
I have Office 2007 (and Excel 2007) installed in my Windows XP sp3, and I use VSTS 2008 Team Suite. I execute option Code Metrics about a csproj in my solution, and I get the error: An error ocurred while calculating Code Metrics How can I debug it? What happened?
stackexchange/codereview
I have an array where I have some numbers. Now I want to sort even numbers in a separate array and odd numbers in a separate. Is there any API to do that? I tried like this int[] array_sort={5,12,3,21,8,7,19,102,201}; int [] even_sort; int i; for(i=0;i<8;i++) { if(array_sort[i]%2==0) { even_sort=Arrays.sort(array...
stackexchange/codereview
I need to be able to manually authorize my users in my controller. I get my authentication from an AD, and then in my controller, I want to map up the userID I get from the AD, to my application's internal userID. Grab the userId from the UserRole table, and then set it in the controller, however, I don't know how to s...
stackexchange/codereview
I am trying to render a two-dimensional half-plane in OpenGL with the following code: void renderHalfplane(double *x, double *n) { glPushMatrix(); double theta = -360.0 * atan2(n[0], n[1])/(2.0*PI); glTranslated(x[0], x[1], 0); glRotated(theta, 0, 0, 1.0); glBegin(GL_TRIANGLES); glVertex4d(0.0, 0.0, 0.0, ...
stackexchange/codereview
When running submissions (<xforms:submission>) over HTTPS against a server that use a self-signed certificate, I am getting an exception in the logs that looks like: ERROR XFormsServer - XForms - submission - xforms-submit-error throwable: sun.security.provider.certpath.SunCertPathBuilderException : unable to find va...
stackexchange/codereview
If I have a table of random values in a sql table, how can I export and display them as a raking rather than the absolute value... for example.. if the three values are 30 85 and 90 how do i get 30 do display as 1 or 1st, 85 as 2 or 2nd etc
stackexchange/codereview
Here's a code I'm working on, overriding equals. I've not tried compiling, but Netbeans is giving me a warning saying .equals on incompatible types. public class Customers { private String name; public Customers(name) { this.name = name; } public boolean equals(String name) { return (t...
stackexchange/codereview
I want IPython or the Python interpreter to auto-load a module when I start them. Is it possible? For example when I start IPython: $ ipython ... >>> from __future__ import division >>> from mymodule import * In [1]: Something like SymPy's live shell found in the tutorial pages.
stackexchange/codereview
I have a paid app that's been out in the Android Market for a few months now, and up to this point that app had no type of copy protection or license verification scheme. I have just finished adding an modified version of the LVL code to my app. To test out the code's license response handling, I signed into my dev acc...
stackexchange/codereview
I have a header declaring functions that take pointers to C++ objects as parameters. The implementaton is in a seperate C++ file. How can I include this header in C and use the functions in C even though the arguments need to be C++ object pointers?
stackexchange/codereview
I am writing a website using Django. I need to push the web site out as soon as possible. I don't need a lot of amazing things right now. I am concern about the future development. If I enable registration, which means I allow more contents to be writable. If I don't, then only the admins can publish the content. The ...
stackexchange/codereview
I am using the IIS Search Engine Optimization Toolkit to scan over a site of mine. One of the compaints it has is that there are multiple canonical URLs for my static assets, e.g. http://example.com links to http://example.com/styles.css https://example.com links to https://example.com/styles.css It is of course cor...
stackexchange/codereview
$hostname['application'] = '127.0.0.1'; $username['application'] = 'root'; $password['application'] = 'root'; $database['application'] = 'band'; $dbdriver['application'] = 'mysql'; class database { private $hostname; private $username; private $password; protected $database; private $dbdriver; ...
stackexchange/codereview
I've got an nsxmlparser. It works well enough, though I had to convert all the special characters coming into it into their coded equivalents: & had to be &amp;, " had to be &quot;, and so on. However, &sect; (§) kills it at parser:didStartElement. Do you know a way around this? Naturally, I need the § characters to sh...
stackexchange/codereview
I am using a ckeditor in replacement with a textbox id txtEditorAnswer but on running I found the following error in these lines x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0; o.modes={wysiwyg:!!n.element.$.form}; if(x.elementMode==1&&y.is('textarea')) var z=y.$.form&&new h(y.$.form);
stackexchange/codereview
I noticed that the Ninject API has calls such as Bind<ISomething>().DoSomethingElse(); How is this achieved?
stackexchange/codereview
I'm trying to get element by name, and I have a problem This is a element from amazon site: <input type="text" style="width: 100%; background-color: rgb(255, 255, 255);" title="Search for" size="50" value="" name="field-keywords" class="searchSelect" autocomplete="off" id="twotabsearchtextbox"> and this is how I'm tr...
stackexchange/codereview
I've opened a dao recordset at a VB application. The problem is that I received an '3037' runtime error, this error says that I can't open any more tables or queries. So, I have to close some, but this doesn't seem to work... Is there any way to increase the number of opened recordsets? I use the next code to sort a Fl...
stackexchange/codereview
I have some JavaScript that runs uses a replace with regular expressions to modify content on a page. I'm having a problem with a specific regex quantifier, though. All the documentation I've read (and I know it work in regex in other languages, too) says that JavaScript supports the {N}, {N,} and {N,N} quantifiers. Th...
stackexchange/codereview
Am familiar with the Head First book (in fact, thought it was brilliant), though sometimes it left me a bit confused with regard to patterns overlapping somewhat. But not really tried before to sit down and match a pattern from theory with a real world requirement. Well, we now have a requirement for which I think we s...
stackexchange/codereview
given user credentials to either a local account on a remote machine or a domain account, how can i check the user privileges these credentials grant on a remote host ? i can lookup the SID for the account, but how do i know if, for instance, this account is a members of the administrators group on the remote host ? i ...
stackexchange/codereview
How do you compare strings so that the comparison is true only if the cases of each of the strings are equal as well. For example: Select * from a_table where attribute = 'k' ...will return a row with an attribute of 'K'. I do not want this behaviour.
stackexchange/codereview
I have a table of items linked to a table of keywords. I want to list all items that share keywords and I want to rank the results so that items that are most similar appear highest. So, I figure items that match all keywords will come highest with items that match only one keyword appearing lower in the list. Where ...
stackexchange/codereview
foreach (var node in root.Find("a[href]")) { var href = node.Attributes["href"].Value; Uri uri; try { uri = new Uri(item.Value.Uri, href); } catch(UriFormatException) { continue; } // *snip* try { if (_imageHosts.IsMatch(uri.Host)) // <--- problematic ...
stackexchange/codereview
How to write dynamic struts <html:option>, I'm doing as below <logic:iterate id="data" name="sendEmailForm" property="eventList"> <html:option value="<bean:write name="data" property="eventId"/>"/> <bean:write name="data" property="title"/> </html:option> </logic:iterate> but getting following error: ...
stackexchange/codereview
I'm curious about whether there are approaches or algorithms one might use to downscale an image based on the amount of detail or entropy in the image such that the new size is determined to be a resolution at which most of the detail of the original image would be preserved. For example, if one takes an out-of-focus o...
stackexchange/codereview
I'm working on a small C++ project which involves a launcher application that does a bit of setup work and then invokes the real application. To be precise, I'm working on the launcher application - the real application is done by a separate team. These programs are both deployed to Windows Mobile devices. Now, I'd lik...
stackexchange/codereview
I would like to know your thoughts on how to model votes for product reviews. If you have done any online shopping you might have noticed that many product reviews have an "x people out of x found this review helpful." Assuming many customers will review many products, and many customers will vote on many reviews, is i...
stackexchange/codereview
I am newbie in C and new to stackoveflow too. I have some problems in coding first oder formula like forall([X],implies(X,f(X))) Here x is a variable, implies is predicate and f is function. It sounds like for all x, x implies function of x i'e f(x). using C. Any kind of suggestions and help will be appreciated.
stackexchange/codereview
I have a class that plays a repeating background music loop with an AVAudioPlayer, and on specific occasion, plays a full-screen video with its own sound track using MPMoviePlayerController. In order to to have only one track at a time, I stop the background music before launching the video: -(void)startVideo{ [bac...
stackexchange/codereview
NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"sampleLayout.pdf" withExtension:nil]; This above line warns NSBundle may not respond to -URLForResource:withExtension: and the app crashes while loading the PDF file from this URL path.
stackexchange/codereview
I am creating a site much like a wordpress blog whereby the front page will display a post loop: with the post_summary, author info, and tags. I have four tables: posts | users | tags | tag relationships to display all the results i would need to do multiple JOINs for in the SELECT statement However, to stay with the ...
stackexchange/codereview
HI All. I m working on a app that is exactly like a radio when i start a channel and go to the home screen radio is running successfully but some time it throws an error and crash and quit the application i got the error on my console .What kind of this error is and how can we remove this error. INFO/WindowManager(90):...
stackexchange/codereview
in my project i have hierarchical data and i want to display it in following format i have just downloaded jquery treeview and tried it on a small ul. i want to know if i can make such a display with jquery treeview. if not please suggest some other controls. i m using asp.NET mvc 2 RTM with C#
stackexchange/codereview
i have two classes namely Flight and Runway. Now i am trying to pass an array of these objects as parameter to a function. void fun(Flight ptr1[],Runway ptr2[]) { ... ... } ptr1 should point to an array of Flight objects and ptr2 should point to an array of Runway objects. Now inside this function fun() how do i acce...
stackexchange/codereview
I need to have a conditional cursor, like: If a row exists (using WHEN EXISTS or something like this), then my cursor is: CURSOR varCursor IS SELECT 1 a FROM DUAL; Else CURSOR varCursor IS SELECT 2 a FROM DUAL; But look, I don't want to change a column result, I want to change the entire cursor. Bellow I put a bi...
stackexchange/codereview
I want to build a fuse-filesystem with IMAP4 in python. As filename I would like to use the subject of each mail. So I can rename the filenames and with this the Subjects. But subjects can be used several times in one directory, so this breaks the common filesystem rules. I wouldn't like to use a difficult directory-sy...
stackexchange/codereview
I getting the following when I try to "test" this WCF: *This operation is not supported in the wcf test client because it uses type MFA_WCF.gridObj()* I should note that this is my 1st attempt to learn WCF and I'm also still learning EF. So I'm sure this is something I did. I'm just wondering if someone can tell me w...
stackexchange/codereview
I tried using Access for queries and it returns extremely unexpected results (where it would return records from contacts table that didn't even appear in the temp_query: SELECT contacts.names_1, contacts.names_2, contacts.addresses, contacts.cities, contacts.us_states_and_canada, contacts.zip_codes FROM contacts, te...
stackexchange/codereview
Good afternoon, I am running into a curious problem with WCF and IntelliTrace. I have an application that I'm testing using a locally-hosted WCF endpoint (the development server built into VS2010) using the basicHttpBinding. The application has been running normally: no exceptions are are making their way to the app ...
stackexchange/codereview
Possible Duplicate: Lock the android device programatically I have made a simple Android app with a pin-code/screen lock. The user have to write a password to lock the phone and then repeat it to unlock the phone. The problem is that the user still can press back, home (etc) to exit the app without writeing the code...
stackexchange/codereview
Hey, trying to figure out a way to use a file I have to generate an SQL insert to a database. The file has many entries of the form: 100090 100090 bill smith 1998 That is,an id number, another id(not always the same), a full name and a year. These are all separated by a space. Basically what i want to to is be able to...
stackexchange/codereview
So I'm trying to document the format of the json returned by an api I am writing against and I'd like to know if there is any popular format for the documentation of json structure. Note I'm not trying to to test or validate anything, I'm just using this for documentation. Also some ways to add comments to non-constan...
stackexchange/codereview
I just created a control with the following code: public partial class KindsEditor : NaviGroupList, INotifyPropertyChanged { private WebBrowser _Browser; private BasicProject _Project; public event PropertyChangedEventHandler PropertyChanged; public bool RequiredDataLoaded { get { return (Project != n...
stackexchange/codereview
So I've been playing with LightSwitch a little tonight. Looks pretty slick and for my needs could be what I need. A few questions I have that maybe the folks here can answer - Deploying the application as a 2-tier app (desktop only). Would the client have to have SQL Serve Express already installed? Or when you build ...
stackexchange/codereview
This is probably a really stupid/simple question with such an obvious answer that it seems not worth stating in restlet documentation. Where and how (if at all) can Restlet pass parameters to methods in ServerResource classes? Given this class: public class FooServerResource extends ServerResource { @Get public...
stackexchange/codereview
What I'm looking for is a how to build a function that takes a child folder an loops through it and backwards in the directory hierarchy to find the first matching file that is specified. A example is that i lets say i have the directory structure: Home / Folder 1 / Folder 2 / Folder 3 And I'm looking for the file styl...
stackexchange/codereview
I am developing a small application in Rails 3. In this application users can be connected to each other. I am mainly using two tables to store user data and relations. I want to search these tables with either firstname or lastname to get the contacts of a user. Table ONE - Profiles In this table I am storing Firstnam...
stackexchange/codereview
In the context of ray/box intersection, what exactly is "a valid intersection interval"? I've been searching through different tutorials, but it seems they mostly seem to expect this as a priori knowledge.
stackexchange/codereview
Are there any tools for Mobile Website (not Mobile Application) Development? For computer websites, CSS grids like Blueprint CSS are used. Is there any thing similar for the mobile version? There's lot of talk about HTML5 + CSS3 + Javascript - a combination thats going to transform Mobile Websites. Not sure how true. A...
stackexchange/codereview
I have a table with 3 columns. One is sessionID as int, other one sessionLength t as int and other sessionActualLength as int. sessionLength is value calculated for time being in online chat in seconds. sessionActualLength comes in place where in certain hours users get bonuses for being online and each second of their...
stackexchange/codereview
I have a rather specific issue with a WCF host in Azure. Please bear with me as I describe the situation. We have a WCF host hosted in and Azure worker role using an net TCP binding. We have two instances of this worker role running to provide redundancy. For reasons that are irrelevant to our problem, we force a re...
stackexchange/codereview
Having the Observer pattern, we all know that based on its class diagram, the SUBJECT uses a reference to the OBSERVER. Meanwhile, the OBSERVER has a reference to SUBJECT in order to register or remove itself. Is this a "Circular Reference"?
stackexchange/codereview
Is there a way to call a method defined in a jQuery plugin directly in my script? update (function($){ $.fn.myPlugin = function (options) { return this.each(function() { function doSomething() { // do something } function doSomethingElse() { // do something else } ...
stackexchange/codereview
i have bunch of htmls on my disk and I know absolute adress of each of them, now I want to make every instance of src="", href="" inside a tags like a, script, img, iframe etc. to point to absolute patch if the given path is relative. I do not know what is the fastest way to do it, by regex, preg_match_all etc ? I want...
stackexchange/codereview
I know what a static array is and how to use it in Java, but my Prof assigned us a program and for one of the many classes we had to create, he asked us to 'use a static array' in such a way that multiple objects will store their data there. For instance, if the objects were car garages, then each garage instance would...
stackexchange/codereview
I've a problem to get the id of dynamically loaded anchor appended to a div. Here is the code that I get after filling the div: <div id="sotto_eti"> <a href="#" id="a">a</a> <a href="#" id="b">b</a> <a href="#" id="c">c</a> </div> and here is the script: <script> $("#sotto_eti a").click(function() { alert($(t...
stackexchange/codereview
I have two HQL queries I am using for a quick-and-dirty unit test. The first looks somewhat like this: from Foo where SOME_FOREIGN_KEY = 42 The second looks like this: from Foo as foo inner join foo.Bar as bar where foo.SOME_FOREIGN_KEY = 42 The SOME_FOREIGN_KEY column is not the name of something that Hibernate kn...
stackexchange/codereview
Possible Duplicate: Running the GCC preprocessor Is there a GCC option to make the GCC preprocessor generate C source code but filter out irrelevant source code? For example, a C file has #define switch to define for many different platforms. I'm only intersted in one platform, so I want the C preprocessor to filter ...
stackexchange/codereview
I am new to the Mac. I am trying to update a particular cell in NSTableView without using -reloadData, as -reloadData updates the whole table. I have tried everything but all was in vain. I am trying to do something similar to what we used to do in CListCtrl in MFC or in .NET.
stackexchange/codereview
The following are pseudo examples, not real regex, but still an example of what I mean: .* (anything) -.* (NOT anything) [A-Z] (Any letter A to Z, caps only) -[A-Z] (NOT any letter A to Z, caps only) EDIT: Changed inverse into complement in the question. Here's where the change was made: "turn any regex into an ...
stackexchange/codereview
Here is my code, i have been trying- -(void) animatedMove:(CCSprite *)character { ccTime actualDuration = 10; id actionMove = [CCMoveBy actionWithDuration:actualDuration position:ccp(screen_width+50, character.position.y)]; id actionBack = [CCMoveBy actionWithDuratio...
stackexchange/codereview
In SharePoint 2010, I would like to create a list in one SiteCollection that queries data from several other SiteCollections that have common fields: Is this possible, and if so - can it be done efficiently? The current proposed solutions involves setting up EventReceivers on each of the SiteCollections that we want t...
stackexchange/codereview
I have a Visual Studio 2010 project which references some third-party components. Their assemblies are accompanied by XML documentation files, which are useful for us (and only us) developers. And whenever the project is built (either in Debug or Release modes) these XML files are copied to the build directory. I can't...
stackexchange/codereview
I seem to have a huge memory leak in a large Java application. But the leak does not seem to be within the JVM memory itself (ie: heap, eden, survivor, code, perm_gen, etc.) since I don't run out of this type of memory (ie: it goes up during use, but it goes back down eventually when the GC runs). My problem is that I...
stackexchange/codereview
I have been digging through some ruby gem code and i came across these and not sure what they means def success? !!@success end def failure? !@success end cattr_accessor :test_response and lastly this chunk of code class_inheritable_accessor :attributes self.attributes = [] def self.attribute(name, options={}) ...
stackexchange/codereview
I have a rails app that does the following (at the moment linear) process: (1) User uploads a file via HTTP and a standard upload form on a standard HTML page (2) The file is uploaded to an apache server (same server as the one hosting the app) (3) The server uploads the file to remote storage service (call this storag...
stackexchange/codereview
When calling the new Facebook Graph API, if we just provide the app_id in the Javascript code, then how can Facebook know it is the real app calling? What if it is another app calling with that app_id?
stackexchange/codereview
I understand that the processor brings data into the cache via cache lines, which - for instance, on my Atom processor - brings in about 64 bytes at a time, whatever the size of the actual data being read. My question is: Imagine that you need to read one byte from memory, which 64 bytes will be brought into the cache?...
stackexchange/codereview
I want to create an activity that uses the intent action for Screen_off - is there an easy way to do this? I keep getting lost as to where I should start - does the screen_off activity need to be defined somewhere and then referred to?
stackexchange/codereview
a table a_id a_value 1 text1 2 test2 b table b_id b_num a_id 1 5 1 2 7 1 3 2 1 4 7 2 5 56 2 Results base a table (edited) a_id:1 a_value:text1 total:3 records a_id:2 a_value:text2 total:2 records How can get this format in sql? query a table and add a field(total) count b...
stackexchange/codereview
> e = Event.first > e.registration_start_utc #registration_start_utc is a datetime column => Sat, 23 Oct 2010 06:38:00 UTC +00:00 > e.registration_start_utc.utc? => true > ActiveSupport::TimeZone.find_tzinfo("America/New_York").utc_to_local(e.registration_start_utc) => Sat, 23 Oct 2010 02:38:00 UTC +00:00 2 ques...
stackexchange/codereview
When i test the flash application from inside the flash-cs4 it works fine, but when i try to export the movie, it gives an error: You have used a feature that requires the Flex SDK: Embed metadata Please set the Flex SDK path if necessary and add it to the library path for this file. The Flex SDK folder contains the b...
stackexchange/codereview
I need to animate widget transparency. It seems to me, that I should use QPropertyAnimation. But how could i define widget translucent? Should I use something like this?
stackexchange/codereview
How can I use windows.h in Qt application? After including it I get several errors like c:\Qt\4.4.3\include/QtCore/../../src/corelib/arch/qatomic_windows.h:387: error: declaration of C function 'long int InterlockedCompareExchange(long int*, long int, long int)' conflicts with d:\old\mingw\bin\../lib/g...
stackexchange/codereview
i want to capture text from opened windows using mouse pointer and keyboard shortcut using C# or java ( like babylon ) , so what i need to know and how to implement it ? what are the libraries i need to use ? or can i use winapi ?
stackexchange/codereview
I want to leverage the warning that Scala issues when a matching is missing ("not exhaustive") - so that I don't forget one (I have dozens). The following simplified example shows my attempt: sealed case class MESSAGE() class SUCCESS_MESSAGE extends MESSAGE class FAILURE_MESSAGE extends MESSAGE def log(str: String, ms...
stackexchange/codereview
Is there a way to create Access databases (.mdb) without actually using Ms Access? I'd like my app to create it instead (when user presses "New Document" on the toolbar). I'm using Delphi 5 Ent. Thanks in advance! :-)
stackexchange/codereview
I need a way to determine if a returned object is a textarea (for example).
stackexchange/codereview
Unlike windows style self explanatory copy/cut/paste commands, I could not understand ring concept in emacs. Since I don't program very often in emacs, I could have not realized the value of ring feature. Can you tell me what is called ring in emacs and how to use it?
stackexchange/codereview
For example, The string is: "{{aaa,bbb},{ccc,ddd},{eee,fff}}" I want the program auto split it as a string pattern Pattern is: {{...},{...},{...}} What is the Pattern Matching regex?
stackexchange/codereview
Right now, I have: public <T> T[] toArray(T[] old) { T[] arr = Arrays.copyOf(old, old.length + size()); int i = old.length; for(E obj : this) { arr[i] = old.getClass().getComponentType().cast(obj); ++i; } return arr; } (Note that this does not fol...
stackexchange/codereview
i using the following code which writes the file from a path to an output stream but every time i run the code, it always write 131768 bytes to the stream regards of my file size(8MB or 5MB or etc). Can someone please check for me? i can't seems to find the problem. Or it there other ways to do it? I'm using NSStream w...
stackexchange/codereview
if I have the following: @projects = Permission.where(["user_id >= ?", 21]) Results In: [#<Permission id: 59, project_id: 13, user_id: 21>, #<Permission id: 59, project_id: 13, user_id: 21>] I then what to use those project_id 's to QUERY as follows: AuditLog.where({ :project_id => @projects }).limit(10) But this er...
stackexchange/codereview
Here is my current .htaccess file: (it is running on my personal WAMP server. And Mod_Rewrite is enable on my server.) <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase /rdypages/ RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d Re...
stackexchange/codereview
Is there a way to extract a keyframe from flv file using C#?
stackexchange/codereview
Basically, I am trying to recreate PHP date's year functionality. Using the number of seconds since 1 January 1970, I am trying to get the year with out using a built in function. I had a an idea, but it did not work because of leap years. Can anyone give me a working formula that takes the seconds since 1970 and ge...
stackexchange/codereview
I seem to be getting different results of fromDate between Mozilla and IE. Is there a more reliable cross-browser way of doing this? [edit] I am actually getting different column values! [/edit] <tr id='id3332201010241' /> <td>20101024</td> <td>20101025</td> <td>1415</td> <td>1445</td> <td>INVDROP</td> <td>H4...
stackexchange/codereview