Daily Archives

Articles indexed Wednesday May 5 2010

Page 22/119 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • inherit properties and then change some on particular site (css)

    - by Radek
    I have three menus on this test web site. I am learning css and trying all the menus inherit all properties from menu class. The second one looks different and is not clickable. I am happy with the 3rd one, just want to make it horizontal and change its position bit. Could somebody tell me why the second menu is not click-able? how I can make the third menu vertical? I thought that display: block; for li of the 3rd menu would do the trick but I do not know the css path for that li.

    Read the article

  • iPhone, special characters in JSON Response

    - by eddit
    Writing an iphone app, and I'm getting my data from a REST API that returns JSON. My problem is, some of the data has special characters embedded and Im getting errors. Example: MartÌn Petite-RiviËre-Saint-FranÁois Here is my current code: NSString *jsonString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; NSMutableArray *tempResults = [[[jsonString JSONValue] objectForKey:@"getRegionResortsLastUpdatedResponse"] objectForKey:@"return"]; Whenever the data has special characters in it "jsonString" return "(null)", otherwise everything works fine. Is this something I can handle on my end, or does the API need to be modified to output the character codes?

    Read the article

  • scala syntax highlighting in bluefish

    - by Synesso
    Scala comes packaged with bluefish syntax config in misc/scala-tool-support/bluefish/ I have attempted to configure this, as per the README, but there is no effect. cp ~/.bluefish/highlighting ~/.bluefish/highlighting_ cat ~/.bluefish/highlighting_ /opt/scala/scala-2.7.7.final/misc/scala-tool-support/bluefish/highlighting > ~/.bluefish/highlighting I have ensured highlighting is turned on in the bluefish config. I have not used bluefish before and am trying it for the first time because there is syntax highlighting support for it. The README says any file I open that has a .scala extension will have the scala highlighting applied. Instead I see no highlighting.

    Read the article

  • Schema design: many to many plus additional one to many

    - by chrisj
    Hi, I have this scenario and I'm not sure exactly how it should be modeled in the database. The objects I'm trying to model are: teams, players, the team-player membership, and a list of fees due for each player on a given team. So, the fees depend on both the team and the player. So, my current approach is the following: **teams** id name **players** id name **team_players** id player_id team_id **team_player_fees** id team_players_id amount send_reminder_on Schema layout ERD In this schema, team_players is the junction table for teams and players. And the table team_player_fees has records that belong to records to the junction table. For example, playerA is on teamA and has the fees of $10 and $20 due in Aug and Feb. PlayerA is also on teamB and has the fees of $25 and $25 due in May and June. Each player/team combination can have a different set of fees. Questions: Are there better ways to handle such a scenario? Is there a term for this type of relationship? (so I can google it) Or know of any references with similar structures?

    Read the article

  • implementing security with session variables, how it is insecure

    - by haansi
    I am doing web based projects in dotnet. Currently I am implementing security using session variables. I keep current user id and user type in session and authenticate user from these session variables (say Session["UserId"],Session["UserName"] and Session["UserType"]). Please help me understand how this could be insecure. I've heard that such security can be broken and applications can be hacked very easily, like it is possible to get session id and directly connect to that session id etc. Please guide me on this.

    Read the article

  • MSMQ - Message Queue Abstraction and Pattern

    - by Maxim Gershkovich
    Hi All, Let me define the problem first and why a messagequeue has been chosen. I have a datalayer that will be transactional and EXTREMELY insert heavy and rather then attempt to deal with these issues when they occur I am hoping to implement my application from the ground up with this in mind. I have decided to tackle this problem by using the Microsoft Message Queue and perform inserts as time permits asynchronously. However I quickly ran into a problem. Certain inserts that I perform may need to be recalled (ie: retrieved) immediately (imagine this is for POS system and what happens if you need to recall the last transaction - one that still hasn’t been inserted). The way I decided to tackle this problem is by abstracting the MessageQueue and combining it in my data access layer thereby creating the illusion of a single set of data being returned to the user of the datalayer (I have considered the other issues that occur in such a scenario (ie: essentially dirty reads and such) and have concluded for my purposes I can control these issues). However this is where things get a little nasty... I’ve worked out how to get the messages back and such (trivial enough problem) but where I am stuck is; how do I create a generic (or at least somewhat generic) way of querying my message queue? One where I can minimize the duplication between the SQL queries and MessageQueue queries. I have considered using LINQ (but have very limited understanding of the technology) and have also attempted an implementation with Predicates which so far is pretty smelly. Are there any patterns for such a problem that I can utilize? Am I going about this the wrong way? Does anyone have an of their own ideas about how I can tackle this problem? Does anyone even understand what I am talking about? :-) Any and ALL input would be highly appreciated and seriously considered… Thanks again.

    Read the article

  • SophiaConf : 20 conférences gratuites ou peu onéreuses du 30 juin au 9 juillet en France à Sophia An

    Bonjour, Cela s'annonce comme l'un des évènements Gratuit phare de l'année en France, et il n'a pas lieu à Paris. [IMG]http://sophiaconf2010.fr/images/logo-top.png[/IMG] La SophiaConf se déroule sur une période de 10 jours et propose une série de conférences gratuites sur les sites de Polytech'Nice-Sophia, de l'INRIA et de l'Agora Einstein. Au programme :Gestion des identités et sécurisation des services web Intellectual Property Right Analysis

    Read the article

  • To find the substring in a given text.. C programm..

    - by RBA
    char *substring(char *text, int position, int length) { int i, j=0; char *temp ; for(i=position-1; i<position+length-1; i++) { temp[j++] = text[i]; } temp[j] = '\0'; return temp; } Hi What is the error in the following code.. I am trying to run this on Fedora Machine.. And its giving me a run-time error "Segmentation Fault". What is this error all about.. and why is it giving this error.. Thanks..

    Read the article

  • How to hide UIStatusBar and show UINavigationBar at the top when UIView changes to LandscapeOrientat

    - by KayKay
    I am using two views (portraitView and landscapeView) loaded from xib in a viewcontroller for different InterfaceOrientation each for Portrait and Landscape mode. The view in portrait mode has statusbar and navigationbar and other one has just the navigationbar. The problem is that even i made statusbar hidden programatically the view in Landscape mode has blank space left at the position of statusbar and below is navigationbar which is for sure looking embarrassing. Is it possible to put the navigationbar at the top - replacing the statusbar position. I tried many options like. if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; self.navigationController.navigationBarHidden = NO; [[self view] setFrame:CGRectMake(0, 0, 480, 320)]; self.navigationController.wantsFullScreenLayout = YES; self.view = self.landscapeView; } But despite all this efforts it only lefts the same 20x480 pixels blank space and below it navigationbar. But here there is no end to trouble when I switch back to portraitView, the navigation bar hides behind the statusbar mere showing remaining 320x(44-20)px on top. Please help and thanks in advance.

    Read the article

  • Preparing for a C#, ASP.NET, JavaScript interview

    - by halivingston
    I have an interview I'm prepping for, I've written A LOT of code, specifically in C# and ASP.NET. I've written fair amounts of JavaScript, but no OO stuff in it. So I'm definately going to brush up on that. I remember for a previous job interview, I was asked Java questions, like not super intricate, but detailed stuff. Now I'm looking for a book maybe that I can read through in a day (or two) and known all the crannies of C#, ASP.NET and JavaScript. Different books obviously I'll be honest, for the Java interview, I actually read The J2EE certification book, and it helped A LOT!

    Read the article

  • Securing WinForms Application suggestions

    - by Sarah Fordington
    I've been looking for a simple key/license system for our users. Its partly to stop piracy (avoid users from sharing the application around) and the other half to track the number of 'licensed users' we have. I have already read a few good suggestions on SO but I'm curious as to how people have implemented the 30 day evaluation criteria. Do you generate a key that stores the date somewhere and do a comparison each time or is it a little more complicated - deleting the file/removing the registry shouldn't deactivate. Are there any example implementations out there that can give me a head start? The irony is that our PM doesn't want to license a third-party system to do it for us. This is for a Windows Forms application.

    Read the article

  • Learning C++ on Linux or Windows?

    - by ReDAeR
    Hi, Since you 'should' learn C/C++ and as part of 'learn as much languages as possible', i decided to learn C++ in depth. My OS is Windows and my question is should i re-install Linux as a dual boot to learn C++ on Linux? Do i miss something if I develop in C++ only on the Windows platform? (possible duplicate: http://stackoverflow.com/questions/1128050/best-operating-system-for-c-development-and-learning)

    Read the article

  • how to populate different records in row of a Grid?

    - by ahmed
    Helo, I have a two Grid where I have to display some records from the table. The table consists of employee names ,manager names and their comments. Now on the first gird I am fetching data of employee names. Now on the second grid I have to display data of manager names and their comments. The data is on the same table. On show button of the first grid it shows all the employees. then on AdvWebGrid.ClickLink or any selected user on the first grid , i have to display the manager names and their comments on the second grid. How can I do that ? Hope my problem is clear?

    Read the article

  • Wicket testing - AnnotApplicationContextMock - There is no application attached to current thread ma

    - by John
    I've written a couple of tests for a small web app, but I get an error when I try to run the page specific tests that makes use of WicketTester. Google sends me to a mailing list for Apache Wicket, where a user experienced the same exception. He/she said the problem was that AnnotApplicationContextMock was initialized before the Wicket Application. I've pasted my WicketApplication class as well. Has any of you dealt with this error before? I've pasted the exception and the class below. Exception: ------------------------------------------------------------------------------- Test set: com.upbeat.shoutbox.web.TestViewShoutsPage ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.545 sec (AnnotApplicationContextMock.java:61) at com.upbeat.shoutbox.web.TestViewShoutsPage.setUp(TestViewShoutsPage.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:129) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:93) at org.unitils.UnitilsJUnit4TestClassRunner$CustomMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:168) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49) at org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:127) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59) at org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:42) at org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:87) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44) at org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:94) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) My page specific test class: package com.upbeat.shoutbox.web; import org.apache.wicket.application.IComponentInstantiationListener; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock; import org.apache.wicket.util.tester.FormTester; import org.apache.wicket.util.tester.WicketTester; import org.junit.Before; import org.junit.Test; import org.unitils.spring.annotation.SpringBeanByType; import com.upbeat.shoutbox.WicketApplication; import com.upbeat.shoutbox.integrations.AbstractIntegrationTest; import com.upbeat.shoutbox.persistence.ShoutItemDao; import com.upbeat.shoutbox.services.ShoutService; import com.upbeat.shoutbox.web.pages.ViewShoutsPage; public class TestViewShoutsPage extends AbstractIntegrationTest { @SpringBeanByType private ShoutService svc; @SpringBeanByType private ShoutItemDao dao; protected WicketTester tester; @Before public void setUp() { final AnnotApplicationContextMock appctx = new AnnotApplicationContextMock(); appctx.putBean("ShoutItemDao", dao); appctx.putBean("ShoutService", svc); tester = new WicketTester(new WicketApplication() { @Override protected IComponentInstantiationListener getSpringComponentInjector(WebApplication app) { return new SpringComponentInjector(app, appctx, false); } }); } @Test public void testRenderPage() { tester.startPage(ViewShoutsPage.class); tester.assertRenderedPage(ViewShoutsPage.class); FormTester ft = tester.newFormTester("addShoutForm"); ft.setValue("nickname", "test-nickname"); ft.setValue("content", "a whole lot of content"); ft.submit(); tester.assertRenderedPage(ViewShoutsPage.class); tester.assertContains("test-nickname"); tester.assertContains("a whole lot of content"); } } AbstractIntegrationTest: package com.upbeat.shoutbox.integrations; import org.springframework.context.ApplicationContext; import org.unitils.UnitilsJUnit4; import org.unitils.spring.annotation.SpringApplicationContext; @SpringApplicationContext({"/com/upbeat/shoutbox/spring/applicationContext.xml", "applicationContext-test.xml"}) public abstract class AbstractIntegrationTest extends UnitilsJUnit4 { private ApplicationContext applicationContext; } WicketApplication: package com.upbeat.shoutbox; import org.apache.wicket.application.IComponentInstantiationListener; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import com.upbeat.shoutbox.web.pages.ParamPage; import com.upbeat.shoutbox.web.pages.VeryNiceExceptionPage; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.upbeat.shoutbox.Start#main(String[]) */ public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } /** * @see org.apache.wicket.Application#getHomePage() */ public Class getHomePage() { return HomePage.class; } @Override protected void init() { super.init(); // Enable wicket ajax debug getDebugSettings().setAjaxDebugModeEnabled(true); addComponentInstantiationListener(getSpringComponentInjector(this)); // Mount pages mountBookmarkablePage("/home", HomePage.class); mountBookmarkablePage("/exceptionPage", VeryNiceExceptionPage.class); mount(new IndexedParamUrlCodingStrategy("/view_params", ParamPage.class)); } protected IComponentInstantiationListener getSpringComponentInjector(WebApplication app) { return new SpringComponentInjector(app); } }

    Read the article

  • OpenSSL 1.0: Remove Elliptic Curves Extension

    - by rursw1
    Hi, Is there any way to remove the elliptic curves extension - elliptic_curves and ec_point_formats? (Via function like SSL_CTX_set_options with SSL_OP_NO_TICKET for the SessionTicket extension, or by conditional compilation, or something else that works...) Thank you in advance!

    Read the article

  • MFC: Reading entire file to buffer...

    - by deostroll
    I've meddled with some code but I am unable to read the entire file properly...a lot of junk gets appended to the output. How do I fix this? // wmfParser.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "wmfParser.h" #include <cstring> #ifdef _DEBUG #define new DEBUG_NEW #endif // The one and only application object CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; // initialize MFC and print and error on failure if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) { // TODO: change error code to suit your needs _tprintf(_T("Fatal Error: MFC initialization failed\n")); nRetCode = 1; } else { // TODO: code your application's behavior here. CFile file; CFileException exp; if( !file.Open( _T("c:\\sample.txt"), CFile::modeRead, &exp ) ){ exp.ReportError(); cout<<'\n'; cout<<"Aborting..."; system("pause"); return 0; } ULONGLONG dwLength = file.GetLength(); cout<<"Length of file to read = " << dwLength << '\n'; /* BYTE* buffer; buffer=(BYTE*)calloc(dwLength, sizeof(BYTE)); file.Read(buffer, 25); char* str = (char*)buffer; cout<<"length of string : " << strlen(str) << '\n'; cout<<"string from file: " << str << '\n'; */ char str[100]; file.Read(str, sizeof(str)); cout << "Data : " << str <<'\n'; file.Close(); cout<<"File was closed\n"; //AfxMessageBox(_T("This is a test message box")); system("pause"); } return nRetCode; }

    Read the article

  • Pygame's Message-multiple lines?

    - by Jam
    I am using pygame and livewires (though I don't think that part is relevant here) to create a game. I've got the game working, but I'm trying to make something akin to a title screen before the game starts. However, it doesn't recognize when I try to make a new line appear. Here is what I have: begin_message=games.Message(value=""" Destroy the Bricks!\n In this game, you control a paddle,\n controlled by your mouse,\n and attempt to destroy all the rows of bricks.\n Careful though, you only have 1 life.\n Don't mess up! The game will start in\n 5 seconds.""", size=30, x=games.screen.width/2, y=games.screen.height/2, lifetime=500, color=color.white, is_collideable=False) games.screen.add(begin_message) The message appears on the screen, but the newline doesn't happen, so I can only read the first part of the message. Is there a way to make this message actually appear, or can I not use the 'Message' for this?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >