instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
////////////////////////////////////////////////////////////////////////////// <!-- To change this template, choose Tools | Templates and open the template in the editor. --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html...
stackexchange/codereview
Assume I have a branch with the following history: A - B - C - D Between B and C I modified a bunch of files including a particular file, call it foo.txt. Then, on revision D, I modified that same file, foo.txt. Meanwhile, a friend of mine took a snapshot of my directory at B and decided he would tweak foo.txt in som...
stackexchange/codereview
I want to replace text from a certain range in my HTML file (like from position 1000 to 200000) with text from another HTML file. Can someone recommend me the best way to do this?
stackexchange/codereview
i have a tableview. i add image to the cells when clicked on the cell in didselectrow method by using cell.conteview addsubview. but the problem is if i click on 1st cell it changes the image and when i click on another cell image will appears but the old image is not removed from the previous cell. This is happening f...
stackexchange/codereview
I have a contact form that is build in arabic language. When it is ever used, the received mail looks like this ... إسلام الإسم مهندس برمجيات المهنة 010 التليÙون email البريد الإلكترونى تجربة Ø§Ù„Ø¥Ø³ØªÙØ³Ø§Ø± I need to solve this issue as soon as possible ...
stackexchange/codereview
I have a random problem...after this widget rotates a complete/full cycle the fadeIn() effect stops work? Here is my HTML & CSS .new-tweet { opacity:0; filter:alpha(opacity=0); } #in-auction-cycle-content { overflow:hidden; width:275px; height:102px; list-style-type:none; margin-bottom:6px; } <ul id="i...
stackexchange/codereview
I have an app widget and I'd like to add Views (TextView, etc.,) to the RemoteView but it never shows up. Here goes the code: RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout); RemoteViews newView = new RemoteViews(context.getPackageName(), R.layout.widget_row_layout); newView....
stackexchange/codereview
I have the following query and it gives me an error :"Incorrect syntax near the keyword 'GROUP'." <-shows me the second GROUP BY statement...Can you tell me why? SELECTventId ,TargetUser ,TargetDomain ,String05 ,Amount ,max(Amount) maximum FROM (SELECT EventId , TargetUser , TargetDom...
stackexchange/codereview
AppEngine allows the definition of blacklists, to disallow access from certain IP Ranges (http://code.google.com/appengine/docs/python/config/dos.html). What I would like to do is the inverse: A whitelist, that only allows access from certain IP Ranges. I am not much of a network specialist, so I would appreciate some ...
stackexchange/codereview
What options for registry virtualization exist that will work with all Windows versions starting from XP? Basically what I need is a way to hijack some registry reads for a particular application and returned "virtualized" values. Something that might add to the complexity of the solution need is the fact that this app...
stackexchange/codereview
I have two tables table1 (p double precesion, t timestamp without zone) and table2 (v double precision, t timestamp without zone) with values for every minute. How do I select 60 rows of the form (t, v, p) for every minute in a specified hour? Some values may not be present, in such case the corresponding retur...
stackexchange/codereview
Suppose i have created one .js file name as: MyNoteBook.js. In this .js file i have written function as name count(). Now I am creating MyNoteBook.aspx page in asp.net. On the event of pageload of .aspx file, i want to call that count() function of that .js file. Is it is possible, If yes then please tell me. If no, ...
stackexchange/codereview
my data structure is like this: +-------------+------+-------+ | USERID (PK) | LEFT | RIGHT | +-------------+------+-------+ | 001 | | 002 | | 002 | 003 | 004 | | 003 | 005 | | | 004 | | | | 005 | 008 | 007 | | 008 | | | | 007...
stackexchange/codereview
while running my qt application in linux, a tab focus appears on the selected control- like this: that doesn't happened in windows. how can i get rid from this visual focus?
stackexchange/codereview
Is it good to have a constructor in abstract class? is it a good programming practice to create constructor of abstract class? since abstract classes can not be initialized, their child classes are initialized. Following is my class structure. public abstract class Scheduler { private Storyboard timer; protec...
stackexchange/codereview
below is part of html code <div id="test1"><span><input type='text' name='add'/><input type='text' name='del'/><span></div> <div id="container"></div> i tried to use jquery to clone #test1 node and remove the add button then add the result to #container i tried write the code like belows,but it seems didn't work $("#...
stackexchange/codereview
I need to know which is the best Java web framework to design an UI. I know some frameworks like vaadin GWT Which one is better and faster? And is there anything other than that?
stackexchange/codereview
Which Mobile Application platform do developers prefer for Bluetooth Based application development ? What do developers think on the current available API's on these platforms ? Does it meet most of your needs ? What kinds of APIs / capabilities for applications would you like to see.
stackexchange/codereview
Just like in the title, what is a contiguous memory block?
stackexchange/codereview
I'm new to Java so I wanted to know whether its possible to do this ? I have a document object say Document doc1 .. once I use a jdom builder to build this object I don't want it to be changed ever .. also it needs to be always available .. i believe the latter can be done using the static keyword .. how do I make sure...
stackexchange/codereview
I would like to add a white space of exactly the width of a given text. I could use \hspace{}, but then I need the width that given piece of text is going to use in my LaTeX document. Another idea is to create an invisible box containing the text. Like \mbox{text}, but invisible. As I am pretty sure that I cannot just...
stackexchange/codereview
ALTER TABLE "APPLICATIONS_SRV_STORAGE" ADD CONSTRAINT "APPL_SRV_STORAGE_APPLICAT_FK1" FOREIGN KEY ("APP_ID") REFERENCES "APPLICATIONS" ("APP_ID") ON DELETE CASCADE ENABLE; Does it mean: When something on table APPLICATIONS is deleted, delte altough the entry in APPLICATION_SRV_STORAGE?
stackexchange/codereview
I am using the C# wrapper Google-API-for-dot-net to query a custom search engine so that only results for that site are returned. The problem is that the results differ from the CSE page and the API results. This is the code I am using: GwebSearchClient Client = new GwebSearchClient(@"http://www.eatout.co.za/"); stri...
stackexchange/codereview
The question is pretty simple - how much does it cost (storage, etc.) to use new clearcase views for each task? Is it a legitimate methodology to use many different views? How do you use views (i.e., for what do you have different views)?
stackexchange/codereview
How to get a security token for iPhone app when the user has reset his security token on the desktop side? In my iPhone app I hard-coded the security token for authentication and login into the salesforce account. Any solution?
stackexchange/codereview
Since Rails uses MVC architecture. I was wondering that if we can use Rails to develop a mobile app or any web app. Out of MVC the 'M' and 'C' won't change to develop the mobile app right? I mean the models and controllers will remain the same. Only the view portion should be changed such that, instead of using html.er...
stackexchange/codereview
For Starters, i would like to note, that this is my first post on Stackoverflow. However, during my web development career, i have used this site numerous times. And now i feel i need an assistance beyond just browsing though google. So my question is does PHP have visual Documentation just like http://visualjquery.co...
stackexchange/codereview
for all my Application , I need to make a document , that will contains all endpoints and database connections are used. I was doing it manually. is there any way , so that we can read and extract information from web.config files. Any idea. Edit: Can it be in such a way that only required data come's up , in my case...
stackexchange/codereview
Without writing a custom rdbuf is there any way to use a stringstream efficiently? That is, with these requirements: the stream can be reset and writing start again without deallocating previous memory get a const char* to the data written (along with the length) without creating a temporary populate the stream witho...
stackexchange/codereview
Possible Duplicate: How could pairing new[] with delete possibly lead to memory leak only? I was always told that it's not safe to call delete on an array allocated with new[]. You should always pair new with delete and new[] with delete[]. So I was surprised to discover that the following code compiles and runs ok,...
stackexchange/codereview
New to ruby, how would I get the file extension from a url like: http://www.example.com/asdf123.gif Also, how would I format this string, in c# I would do: string.format("http://www.example.com/{0}.{1}", filename, extension);
stackexchange/codereview
I'm considering using an ORM like Entity Framework 4 for a system like 911. Can someone please enumerate the pros and cons for such systems? Thanks in advance! Daniel
stackexchange/codereview
There are so many goodies that come with a modern Unix shell environment that the thing I need is almost always installed on my machine or a quick download away; the trouble is just finding it. In this case, I'm trying to find basic statistical operations. For example, right now I'm prototyping a crawler-based app. Tha...
stackexchange/codereview
I am trying to rewrite a url in an httpmodule. If I have the string "/learning/index.aspx". I want to rewrite it to "/learning/pages/index.aspx" The rewrite will always put the "pages" in the same position in the string, before the last "/", so "/index, would become /page/index.aspx, or /topics/topic1.aspx, would becom...
stackexchange/codereview
I get the infamous "Dialogs must be user-initiated" Security Exception when I try to print some stuff in Silverlight. As you can see, the dialog is as user-initiated as can be: John Papa couldn't help me much out neither, because I don't have any breakpoint set. Mr MSDN thinks it could also be that I'm just taking too...
stackexchange/codereview
The following code: #include <stdint.h> int main() { uint8_t Byte; if (Byte < 0) { } } emits the following compilation warning: main.cpp: In function `int main()': main.cpp:6: warning: comparison is always false due to limited range of data type This is fine. But when I change condition to: (1) if (true || ...
stackexchange/codereview
With BAT/CMD script I can simply use "msiexec /i <whatever.msi> /quiet /norestart" and then check %errorlevel% for the result. With VBScript, using the Wscript.Shell object Run() method, I can get the result like this: "result = oShell.Run("msiexec /i ...", 1, True)" How can I do this with PowerShell?
stackexchange/codereview
I want to load a JSON file from my own server containing an array into a javascript Object variable. I would like to do it at the beginning of page load in a synchronous way because data is needed during page load. I managed to use jQuery.getJSON but this is asynch ajax and it seems a little overkill. Is there a way t...
stackexchange/codereview
I am working in Visual Web Developer 2010 Express, and using the Entity Framework code-first CTP. I am able to do this with the new SQL Server CE but I am unable to find a connection string to work with SQL Server Express. This one, using the SQL Server CE beta, works fine (database is created and recreated on model ch...
stackexchange/codereview
I want to use the output of mysqldump to update entries in a live database. I don't want to delete the entries first, simple update statements are fine. Is there a simple way to convert the output of mysqldump which contains INSERT statements to the corresponding UPDATE statements? It seems such a basic feature, so I'm...
stackexchange/codereview
Given the following code: enum Fruits{ eApple, eBanana }; template<> struct SomeFruit< eApple > { void eatIt() { // eat an apple }; }; template<> struct SomeFruit< eBanana > { void eatIt() { // eat a banana }; }; Is there a way to call the explicitly specialized eatIt(), for each of Fruits, without having to...
stackexchange/codereview
When designing a new Crystal Report you have to create a new database connection. I have selected OLE DB (ADO) as the 'driver' as it made more sense than DAO,RDO or the other options for my requirements. I need to execute an SQL Server 2005/2008 stored procedure on a remote server and show the results in Crystal Repor...
stackexchange/codereview
i have alot of tables with alot of columns and want to generate xml using linq without having to specify the column names. here's a quick example: users --------------- user_id name email user_addresses --------------- address_id user_id city state this is the xml i want to generate with linq would look like <user>...
stackexchange/codereview
If I replace a MySQL 5.1 server with a MariaDB Server (Maria & XtraDB storages) instead of MySQL (MyISAM & InnoDB), will most of MySQL client software (incl. applications made with PHP 5.2 and Java SE 1.6) ... just remain working without any changes (with minor regressions maybe)? Or will I have to replace/reconfigure...
stackexchange/codereview
I'm looking for a fast interpreted language for a microcontroller. The requirements are: should be fast (not crucial but would be nice) should be light on data memory (small overhead <8KB, excludes program variable space) preferably would be small in program size and the language would be compact preferably, human rea...
stackexchange/codereview
Yesterday I worked on a project where I upgraded to Entity Framework 4 with the Repository pattern. In one post, I have read that it is necessary to turn off the custom tool generator classes and then write classes (same like entites) by hand. That I can do it, I used the POCO Entity Generator and then deleted the new ...
stackexchange/codereview
I'm trying to profile Nutch using VisualVM. Lucene is the part of the Nutch core responsible for generating url indexes and for searching these indexes due to some query. I'm running Nutch through Apache Tomcat and I would like to determine how much time Nutch spends in various function calls (including Lucene calls)...
stackexchange/codereview
I have a table with the following columns: id, target (string), audience_group_id, rating (Integer), job_id target column is a string representation of one of the following values: predicted, actual, updated I thought to add method in Job class: Map<AudienceGroup, Integer( this it the rating)> getAudienceRatingPerPred...
stackexchange/codereview
i want to display many images like thumbnails in a scroll view and and i want the images displayed dynamically we scrolls down or left like a table view cells can u please tell how to that... Thanks with the following code..when we scroll the scroll view im calling this code and able to display the images dynamically (...
stackexchange/codereview
Can Hibernate map a Java Calendar object to an SQL TIMESTAMP column?
stackexchange/codereview
I have this html that shows up fine in firefox except in IE and chrome <div id="snippets"> <div class="snippet"></div> <div class="snippet"></div> <div class="snippet"></div> <multiple of these> </div Each div with snippet class is showing up as child of the previous one. I have .snippet { clear:both } what ...
stackexchange/codereview
I'm attempting to do something extremely simple - take the current date and time, and parse it in the desired format. private final String datePattern = "yyyy:DDD"; private final String timePattern = "hh:mm:ss"; public void setDateAndTime(){ // Default constructor initializes to current date/time Date currentDate...
stackexchange/codereview
I have a popup fixed window with a list of elements in a list. See this page and move mouse over "WEBSHOP": http://109.72.95.174/astudio/sites/danydiop/taxonomy/term/31 In internet explorer 8, for some reason the text in is highlighted only if I scroll the page. In other words, the links remain white, if I move the ...
stackexchange/codereview
I have a JS script which created a new Node and inserts it to the HTML page. I am handling DOM mutation events and can capture DOMNodeInserted event. Inside that function I want to find out the source (i.e. in which part of the HTML has the script function been called) and the target (i.e. in which part the node is bei...
stackexchange/codereview
I am getting parse exception when i execute the below code.Can anyone please help me out private Boolean validateDateFormat(HttpSession session, PropertiesHandler props, String startDate,Date sqlDate) { logger.info("Enter validate"); Boolean isvalid = true; HashMap hashMap = new LinkedHashMap();...
stackexchange/codereview
I have learned that I can never access a private variable, only with a get-function in the class. But then why can I access it in the copy constructor? Example: Field::Field(const Field& f) { pFirst = new T[f.capacity()]; pLast = pFirst + (f.pLast - f.pFirst); pEnd = pFirst + (f.pEnd - f.pFirst); std::copy(f....
stackexchange/codereview
Most programs fits well on <4GB address space but needs to use new features just available on x64 architecture. Are there compilers/platforms where I can use x64 registers and specific instructions but preserving 32-bits pointers to save memory? Is it possible do that transparently on legacy code? What switch to do tha...
stackexchange/codereview
Short explanation Button.CommandProperty is bound to SomeObject.SomeCommand property of the ViewModel. When SomeCommand property of SomeObject is set to null or entire SomeObject property is set to null, this button remains enabled. How can the button be disabled under this circumstances? Detailed explanation I am crea...
stackexchange/codereview
I have been using the plug in jquery.newsticker.js to display a newsticker that fades each node in and out. Previously we'd been using a <ul> but now we want to use our xml rss feed file so we don't have to update two files. My code for the <ul> newsticker was as follows $.get( "AJAX/tickerContent.php", {}, functio...
stackexchange/codereview
Previously I get an answer to the linking of an element. My next question is: how can I get the "radius" parameter of a binded circle, from the marker? The code: var marker = new google.maps.Marker({ position: new google.maps.LatLng(lat,lng), }); var circle = new google.maps.Circle({ map: map, radius: 50, }); ci...
stackexchange/codereview
I have a number of packages in my Java web application. In some of them I use this construct: public class Foo { private static Logger logger = LoggerFactory.getLogger("com.XXX"); public void bar() { Foo.logger.debug("Method bar() was just called"); } } Of course, it's just an example. Everything works fine,...
stackexchange/codereview
I want call the function startActivity in two ways: First (It works): public class HelloWorld extends Activity { public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId() == 1){ startActivity(new Intent(Intent.ACTION_DIAL,Uri.parse("tel:660718109"))); ...
stackexchange/codereview
I have a blog of code written such as this: <div class="box"> <div class="statusbox"> <div class="cleft">some stuff</div> <div class="cright">some more stuff</div> </div> </div> and this is the CSS code for it: .box{padding:10px; border: 1px black solid;width: inherit;} .statusbox{border-bottom: 2px ...
stackexchange/codereview
I'm a student and right now going through exceptions and errors in Java. I have a confusion about when error occurs. Please share with me some examples.
stackexchange/codereview
After struggling for about one week with a problem in Silverlight 4 + MVVM-Light toolkit and after searching the web without success I want to present my problem here and hope that somebody could give me some hints. I want to present the simplified programm: My model classes: Person public class Person { private d...
stackexchange/codereview
I have a table of invoices. My service layer knows how to calculate the invoice Total for one invoice, but if I want to filter a set of invoices by Total, the LINQ query fails because there is "No Supported Translation in SQL". This happens because nested query cannot be performed for every invoice record. What is the ...
stackexchange/codereview
I want to open Safari inside an app in Iphone. like there is a NavigationController & its view has safari in it. how can i do this?? Any help???
stackexchange/codereview
I'm using Ruby 1.8.7, Rails 2.3.8, and using Authlogic 2.1.6 for registration, login, logout. In fact, those three things are nearly all I've done! During registration, if the user has errors in their registration information, I want the password and password_confirmation fields to be empty when the view is redrawn. I...
stackexchange/codereview
I work with scilab, but during a project, scilab has to deal with a large number of variables. I was wondering if i can do the following var_list = who_user(); for _var_ = var_list do if _var_ is global then writetofile(human_readablefile, _var_) end end clear() of course this is a pseudocode, and i have a few...
stackexchange/codereview
How can i resolve the below dirty read problem in sql server. There is a customer invoice report, which runs on 1:00 AM in afternoon and after that all invoices are sent to the respective customer for payments. Let us say one of the customer has 1000$ to be paid. Customer pays 1000$ at 1:00 AM and at the same time repo...
stackexchange/codereview
How can I select id of anchor tag within onclick function with jquery? <a id="123" href="#" onclick="javascript: showDialog( select id of this anchor )"> Click it </a>
stackexchange/codereview
I'm looking for a way to generate an image with various text, provided as a parameter (includes specified font) and I have another image used as a template (some sort of background). Please help in pointing a way to achieve that, if it is actually possible.
stackexchange/codereview
I have tried to implement HTML5 in Android OS. But i didnt get it....Can anyone give example HTML 5 in Android?
stackexchange/codereview
I have an html that has a lot of the following: <TD CLASS="broke"> - WF-1234567 - </TD> <TD CLASS="broke"> - WF-1111111 - </TD> <TD CLASS="broke"> - WF-7654321 - </TD> I want to make a javascript bookmarklet to replace all the 7-digit numbers with a hyperlink. How does one do this? My attempt with many things wrong...
stackexchange/codereview
I am using pyobjc to add some needed OSX functionality to some random python software. I will need to access API-defined objc-land constants from python-land. An example of such constants lies far down in the NSRunningApplication page, specifically the three possible values of NSApplicationActivationPolicy. For context...
stackexchange/codereview
Is possible to join a dimension to an OLAP cube using fields that do not have a foreign-key relationship in the underlying relational DB?
stackexchange/codereview
I have a SQL Server 2008 database with the following information in a table: ID Name -- ---- 1 John 2 Jill 3 John 4 Phil 5 Matt 6 Jill I want to display the unique names in a drop down list. Because of this, I need just one of the IDs associated with the unique name. I know it's dirty. I didn't create th...
stackexchange/codereview
To be more clear, I am trying to modify the Form autogenerated by Sharepoint which you can see in Sharepoint Designer under Workflows -> Your Workflow -> Forms By default you are given two buttons which is start and cancel which is self explainable, Start starts the workflow and Cancel does nothing. Once I click on...
stackexchange/codereview
I have a square which I'm rendering using four vertices and GL_LINE_LOOP. It works fine. However, if I start to rotate this square on all axes and part of the square leaves the emulator screen, the loop appears to drop the vertex that has left the screen. I then get a triangle for a while until the fourth vertex return...
stackexchange/codereview
If the pdf viewer plugin is not installed how to detect it and give a alert message to install pdf viewer
stackexchange/codereview
I am using Zip Archive library for compressing and decompressing files, i needed to enable AES encryption so by Uncommenting #def ZIP_AES in the _features.h file included with the library and recompiling I got CZipException for decompression "WinZip AES encryption has not been enabled for the library, but is required...
stackexchange/codereview
I use OpenSSL to encryt a string. After that I want to encode the encrypted string with base64 algorithm also using OpenSSL. So I found the following code snipped: ( bit.ly/adUSEw ) char *base64(const unsigned char *input, int length) { BIO *bmem, *b64; BUF_MEM *bptr; b64 = BIO_new(BIO_f_base64()); bmem = BIO_new(BIO_...
stackexchange/codereview
Usually a query returns a user model array, but I want a name array. Is there some convenient way to implement this?
stackexchange/codereview
In Xcode I use targets to release several apps versions which share some base code and tend to have different graphics. i.e. Pretending I have target JOHN and target DOE. I could add different images named exactly example.png to the bundle, and have each one targeted respectively. The code does not need any changes thi...
stackexchange/codereview
I'm curious how I can dynamically set a model's validation attributes. For instance, I often have Views where certain fields should be required when a user is in a certain role, but not required when a user is in another role. I would like both the server-side and client-side validation to be set accordingly.
stackexchange/codereview
I'm modifying files on a UNIX system and accessing them on a Windows box. The server runs samba and there is some amount of caching done by the client. When I modify the file on the UNIX side, the only reliable way to see the new version of the file is to right click in Windows Explorer and select "refresh". I'm look...
stackexchange/codereview
I know this question is an old one but having researched and tried and tried for 2 days now i am still not having any luck and I hope someone here could give me some advice! Problem: I have a page that i need to apply a sticky footer, simple normally but here's where i'm having the problem. I can get the footer div(#f...
stackexchange/codereview
I have written a module to add my own events, and in the home page i would like to show only latest events. So in that case i have to add order by to query but i couldnot do that, it always throws fatal error. This is what i have done. $_offers = Mage::getSingleton('offerings/offerings')->getCollection(); This retur...
stackexchange/codereview
This is a best practices question. I am making an array type * x = malloc(size*sizeof(type)); AFAIK sizeof gives a return value of size_t. Does that mean that I should use a size_t to declare, or pass around size? Also when indexing the array should I also use a size_t for the index variable? What is the best prac...
stackexchange/codereview
I am trying to write a program in android that does a lot of string and xml parsing. I need suggestion of which way to go : Use JNI and implement parsing in C++ and use C++ xml SAX parsing (Android - NDk) Go with java and parse xml with SAX
stackexchange/codereview
In a game such as Warcraft 3 or Age of Empires, the ways that an AI opponent can move about the map seem almost limitless. The maps are huge and the position of other players is constantly changing. How does the AI path-finding in games like these work? Standard graph-search methods (such as DFS, BFS or A*) seem impo...
stackexchange/codereview
I want to schedule my windows service with Quartz.NET.I tried some examples but,i can't schedule my windows service.How can i do it? Thanks.
stackexchange/codereview
I tried to make use of $_SERVER, but it didn't work for me. What I need is: In order to access a page on my site, the user must come back from Paypal. If he isn't redirected from Paypal to my site, then don't execute the file but give the user an error instead. How can I do this? I tried the following: $url = 'paypal'...
stackexchange/codereview
We are storing allot of time series data into our own proprietary "database". In the next version of our system we want to give our users a simple query mechanism to extract the raw data from the database (as a complement to the reports our system can create) by using standard tools. I have looked at the possibility to...
stackexchange/codereview
I have a Twisted server under load. When the server is under load, memory usage increases, and it is never reclaimed (even when there are no more clients). Next time it goes into high load, memory usage increases again. Here's a snapshot of the situation at that point: RSS memory is 400 MB (should be 200MB with usual ...
stackexchange/codereview
I'm trying to sort an array by its numeric keys as if they were not numbers -- I don't want natural sorting. $arr = [ '1000' => 'DUMMY', '1001' => 'TEST', '100001' => 'DUMMY1', '100002' => 'DUMMY3', '100004' => 'DUMMY4', '100100' => 'test1', '100102' => 'DUMMY123' ]; After sorting, the resu...
stackexchange/codereview
C defines various rules regarding integer promotion, here's a great answer describing how this works. In GCC you can do this: #define max(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b; }) Which will evaluate to the maximum value of the type determined by the C rules a...
stackexchange/codereview
A database schema with a relation Employee whose attributes are as shown below, with types specified for multi-valued attributes. Employee = (ename, ChildrenSet multiset(Children), SkillSet multiset(Skills)) Children = (name, birthday) Skills = (type, ExmSet setoff(Exams)) Exams = (year, city) Define the above schema...
stackexchange/codereview
I use Zend Framework in my web application. I have the next URL: domain/user/user/username. Where first user is a controller in the default module. Second user is a GET variable. username is a value of this variable. All good. But for the good usability I want to have the next URL: domain/user/username. I know that by ...
stackexchange/codereview
I am new in android development, and I need advice about structure.I want to develop Tic tac toe game, and have 3 images: 1 - 3×3 grid 2 - circle 3- cross. My idea: I need some layout with background image(3×3 grid) and table 3 x 3 with ImageViews, after clicking on some position we load image(circle or cross) in our t...
stackexchange/codereview