Search Results

Search found 1227 results on 50 pages for 'ole christian'.

Page 17/50 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • URL encoding for latin characters in Java

    - by sammichy
    I'm trying to read in an image URL. As mentioned in the java documentation, I tried converting the URL to URI by String imageURL = "http://www.shefinds.com/files/Christian-Louboutin-Décolleté-100-pumps.jpg"; URL url = new URL(imageURL); url = new URI(url.getProtocol(), url.getHost(), url.getFile(), null).toURL(); URLConnection conn = url.openConnection(); InputStream is = conn.getInputStream(); I get the following error when the code is executed http://www.shefinds.com/files/Christian-Louboutin-Décolleté-100-pumps.jpg What am I doing wrong and what is the right way to encode this URL?

    Read the article

  • heroku time zone problem, logging local server time

    - by Ole Morten Amundsen
    UPDATE: Ok, I didn't formulate a good Q to be answered. I still struggle with heroku being on -07:00 UTC and I at +02:200 UTC. Q: How do I get the log written in the correct Time.zone ? The 9 hours difference, heroku (us west) - norway, is distracting to work with. I get this in my production.log (using heroku logs): Processing ProductionController#create to xml (for 81.26.51.35 at 2010-04-28 23:00:12) [POST] How do I get it to write 2010-04-29 08:00:12 +02:00 GMT ? Note that I'm running at heroku and cannot set the server time myself, as one could do at your amazon EC2 servers. Below is my previous question, I'll leave it be as it holds some interesting information about time and zones. Why does Time.now yield the server local time when I have set the another time zone in my environment.rb config.time_zone = 'Copenhagen' I've put this in a view <p> Time.zone <%= Time.zone %> </p> <p> Time.now <%= Time.now %> </p> <p> Time.now.utc <%= Time.now.utc %> </p> <p> Time.zone.now <%= Time.zone.now %> </p> <p> Time.zone.today <%= Time.zone.today %> </p> rendering this result on my app at heroku Time.zone (GMT+01:00) Copenhagen Time.now Mon Apr 26 08:28:21 -0700 2010 Time.now.utc Mon Apr 26 15:28:21 UTC 2010 Time.zone.now 2010-04-26 17:28:21 +0200 Time.zone.today 2010-04-26 Time.zone.now yields the correct result. Do I have to switch from Time.now to Time.zone.now, everywhere? Seems cumbersome. I truly don't care what the local time of the server is, it's giving me loads of trouble due to extensive use of Time.now. Am I misunderstanding anything fundamental here?

    Read the article

  • Namespaces combined with TFS / Source Control explanation

    - by Christian
    As an ISV company we slowly run into the "structure your code"-issue. We mainly develop using Visual Studio 2008 and 2010 RC. Languages c# and vb.net. We have our own Team Foundation Server and of course we use Source Control. When we started developing based on the .NET Framework, we also begun using Namespaces in a primitive way. With the time we 'became more mature', i mean we learned to use the namespaces and we structured the code more and more, but only in the solution scope. Now we have about 100 different projects and solutions in our Source Safe. We realized that many of our own classes are coded very redundant, i mean, a Write2Log, GetExtensionFromFilename or similar Function can be found between one and 20 times in all these projects and solutions. So my idea is: Creating one single kind of root folder in Source Control and start an own namespace-hierarchy-structure below this root, let's name it CompanyName. A Write2Log class would then be found in CompanyName.System.Logging. Whenever we create a new solution or project and we need a log function, we will 'namespace' that solution and place it accordingly somewhere below the CompanyName root folder. To have the logging functionality we then import (add) the existing project to the solution. Those 20+ projects/solutions with the write2log class can then be maintained in one single place. To my questions: - is that a good idea, the philosophy of namespaces and source control? - There must be a good book explaining the Namespaces combined with Source Control, yes? any hints/directions/tips? - how do you manage your 50+ projects?

    Read the article

  • HTML + CSS dynamic render in flash?

    - by Ole Jak
    I have HTML + CSS text. I need some lib with simple function like "Render String Var conteining HTML" So no external files (like in flash lib called HTMLwraper you just have to play your SWF on top of HTML). dinamic! I give it string it renders It into some conteiner (not as a bitmab but as if it was real HTML dynamically rendered in flash). (And I need real HTML + CSS support not what normal rich text block gives us) I am going to use it in with Flex (Flash Builder) so I like MXML component model but even pure flash AS3 will workout. It should be Free and Opensource (any license like GPL, LGPL etc will be ok). So Is out there such flash\flex library for HTML + CSS dynamic rendering (rfom given String or XML)?

    Read the article

  • Two n x m relationships with the same table in mysql

    - by Christian
    I want to create a database in which there's an n x m relationship between the table drug and the table article and an n x m relationship between the table target and the table article. I get the error: Cannot delete or update a parent row: a foreign key constraint fails What do I have to change in my code? DROP TABLE IF EXISTS `textmine`.`article`; CREATE TABLE `textmine`.`article` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Pubmed ID', `abstract` blob NOT NULL, `authors` blob NOT NULL, `journal` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`drugs`; CREATE TABLE `textmine`.`drugs` ( `id` int(10) unsigned NOT NULL COMMENT 'This ID is taken from the biosemantics dictionary', `primaryName` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`targets`; CREATE TABLE `textmine`.`targets` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `primaryName` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`containstarget`; CREATE TABLE `textmine`.`containstarget` ( `targetid` int(10) unsigned NOT NULL, `articleid` int(10) unsigned NOT NULL, KEY `target` (`targetid`), KEY `article` (`articleid`), CONSTRAINT `article` FOREIGN KEY (`articleid`) REFERENCES `article` (`id`), CONSTRAINT `target` FOREIGN KEY (`targetid`) REFERENCES `targets` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`contiansdrug`; CREATE TABLE `textmine`.`contiansdrug` ( `drugid` int(10) unsigned NOT NULL, `articleid` int(10) unsigned NOT NULL, KEY `drug` (`drugid`), KEY `article` (`articleid`), CONSTRAINT `article` FOREIGN KEY (`articleid`) REFERENCES `article` (`id`), CONSTRAINT `drug` FOREIGN KEY (`drugid`) REFERENCES `drugs` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    Read the article

  • Can a script called by XHR reference $_COOKIE?

    - by Christian Mann
    Quick yes/no - I'm building an AJAX application and some scripts require authentication. Can I read $_COOKIE['username'] and $_COOKIE['password'] on the server if the PHP script was called via XHR, whether that be $.get() or $.post()? Side question: Can it also set cookies? Is that considered "good practice"?

    Read the article

  • RegEx for MetaMap in Java

    - by Christian
    MetaMap files have following lines: mappings([map(-1000,[ev(-1000,'C0018017','Objective','Goals',[objective],[inpr],[[[1,1],[1,1],0]],yes,no)])]). The format is explained as mappings( [map(negated overall score for this mapping, [ev(negated candidate score,'UMLS concept ID','UMLS concept','preferred name for concept - may or may not be different', [matched word or words lowercased that this candidate matches in the phrase - comma separated list], [semantic type(s) - comma separated list], [match map list - see below],candidate involved with head of phrase - yes or no, is this an overmatch - yes or no ) ] ) ] ). I want to run a RegEx query in java that gives me the Strings 'UMLS concept ID', semantic type and match map list. Is RegEx the right tool or what is the most efficent way to accomplish this in Java?

    Read the article

  • how can I unload a swf with AS3?

    - by Ole Media
    Any body can help on how I can do to unload a swf before I load the next one? var mLoader:Loader = new Loader(); function loadSWF(e:Event):void { var imageId:Array = e.target.name.split("_"); var targetId:int = imageId[0]; var caption:int = imageId[1]; txt = arrayText[caption]; dynText1.text = ""; dynText1.text = arrayText[caption]; dynText1.setTextFormat(textFormatMain); var swf:String = "swf/" + xmlList[targetId].image[caption].@swf; if (mLoader.content != null) { swfLoad.swfArea.mLoader.unload(); swfLoad.swfArea.mLoader.load(null); } mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(new URLRequest(swf)); } //-------------------------------------------------------------------------// function onCompleteHandler(loadEvent:Event):void { swfLoad.swfArea.addChild(loadEvent.currentTarget.content); TweenLite.to(swfLoad, 0.5, {alpha:1}); } function onProgressHandler(mProgress:ProgressEvent):void { //var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; //trace(percent); }

    Read the article

  • Importing a libary into Eclipse

    - by Christian
    I want to use Lucene in my project. When I simply copy the .jar file into my project than I get the error "Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found." How do I import a library like Lucene the right way in Eclipse?

    Read the article

  • Wpf ListViewItem Background binding to enum

    - by Christian
    Hi Guys I´ve got a ListView which is bound to the ObservableCollection mPersonList. The Class Person got an enum Sex. What i want to do is to set the background of the ListViewItem to green if the person is male and to red if the person is female. Thanks for the answers!

    Read the article

  • Trace PRISM / CAL events (best practice?)

    - by Christian
    Ok, this question is for people with either a deep knowledge of PRISM or some magic skills I just lack (yet). The Background is simple: Prism allows the declaration of events to which the user can subscribe or publish. In code this looks like this: _eventAggregator.GetEvent<LayoutChangedEvent>().Subscribe(UpdateUi, true); _eventAggregator.GetEvent<LayoutChangedEvent>().Publish("Some argument"); Now this is nice, especially because these events are strongly typed, and the declaration is a piece of cake: public class LayoutChangedEvent : CompositePresentationEvent<string> { } But now comes the hard part: I want to trace events in some way. I had the idea to subscribe using a lambda expression calling a simple log message. Worked perfectly in WPF, but in Silverlight there is some method access error (took me some time to figure out the reason).. If you want to see for yourself, try this in Silverlight: eA.GetEvent<VideoStartedEvent>().Subscribe(obj => TraceEvent(obj, "vSe", log)); If this would be possible, I would be happy, because I could easily trace all events using a single line to subscribe. But it does not... The alternative approach is writing a different functions for each event, and assign this function to the events. Why different functions? Well, I need to know WHICH event was published. If I use the same function for two different events I only get the payload as argument. I have now way to figure out which event caused the tracing message. I tried: using Reflection to get the causing event (not working) using a constructor in the event to enable each event to trace itself (not allowed) Any other ideas? Chris PS: Writing this text took me most likely longer than writing 20 functions for my 20 events, but I refuse to give up :-) I just had the idea to use postsharp, that would most likely work (although I am not sure, perhaps I end up having only information about the base class).. Tricky and so unimportant topic...

    Read the article

  • Regex for splitting a german address into its parts

    - by Christian
    Good evening, I'm trying to splitting the parts of a german address string into its parts via Java. Does anyone know a regex or a library to do this? To split it like the following: Name der Straße 25a 88489 Teststadt to Name der Straße|25a|88489|Teststadt or Teststr. 3 88489 Beispielort (Großer Kreis) to Teststr.|3|88489|Beispielort (Großer Kreis) It would be perfect if the system / regex would still work if parts like the zip code or the city are missing. Is there any regex or library out there with which I could archive this? EDIT: Rule for german addresses: Street: Characters, numbers and spaces House no: Number and any characters (or space) until a series of numbers (zip) (at least in these examples) Zip: 5 digits Place or City: The rest maybe also with spaces, commas or braces

    Read the article

  • PHP library for keeping your site Indexed by Google Bing etc

    - by Ole Jak
    I need some library which would be able to keep my urls Indexed and described. So I want to say to it something like Index this new url "www.bla-bla.com/new_url" with some key words or something like that. And I want to be soure that If I told my lib about my new URL Google and others will 100% find it As soon as possible and people will be able to find this URL on the web. Do you know any such libs?

    Read the article

  • WPF DataTemplates with VS2010 designer support + reusable - would you do it that way?

    - by Christian
    Ok, I am currently tidying up all my old stuff. I ran into the issue of "code only DataTemplates" - which are really a pain in the ass. You can't see anything, they are really hard to design, and I want to improve my project. So I had the idea to use the following solution. The main benefits are: You have designer support for your data template You can easily include example sample data The file naming is consistent and easy to remember The preview does not require an additional XAML wrapper (even with code only controls) I will try to explain and illustrate my solution using a few pictures. I am interested in feedback, especially if you can imagine a better way to do it. And, of course, if you see any maintenance or performance issues. Ok, lets start with a simple PreviewObject. I want to have some data in it, so I create a subclass which will automatically fill in some dummy data. Then I add a list to the control, and name this list. Afterwards I add a DataTemplate, this is the sole reason for the whole control (to be able to see and edit the DataTemplate in place): Now I use this control to get my DataTemplate, to use it in other places. To make this easier, I added some code in the code behind, see here: Now I want a control to show me a list of PreviewItems, so I created a "code-only" control which creates an instance of my service (or gets one using DI in real world) and fills its list box with it: To view the result of this work, I added this control inside the same named XAML, this is basically only to be able to see the final result: What I do not like in this solution: The need to create the last control in "code only". So I tried something different while writing this post. The following two screenshots illustrate the approach. I am creating an instance of the service inside the DataContext, and I am using bindings to supply the Itemssourc and the ItemTemplate. The reason for the strange "static property" is refactoring support. If I hardcode the path in the designer (e.g. using "Path = PreviewHistory") and I refactor the names (which happens quite often, early design phase) - I screw up my controls without realizing it. Does anyone has a better idea for this? I am using Resharper, btw. Thanks for any input, and sorry for the image overkill. Just easier to explain that way.. Chris

    Read the article

  • Small web-framework like Sinatra, Ramaze etc in .NET

    - by Christian W
    Are there any similar frameworks like Sinatra, Ramaze etc in .NET? I'm in theory after a framework that let's me create an entire webapp with just one classfile (conceptually) like Sinatra. I'm going to use it for something work-internal, where ASP.NET MVC is too "big" (and I get confused by it's usage) and I have WebForms up to my ears right now (doing a big webforms based project, currently hating it ;) ) Any suggestions? Oh, and I need to be able to host it in IIS. I would go for IronRuby with Sinatra, but I can't find a step-by-step tut for setting it up in IIS ;)

    Read the article

  • Why GPRS modem provides embedded TCP/IP stack

    - by Christian Madsen
    My colleague and I are mining the GPRS MODEM market for a module suitable for use with embedded Linux. During the market scan, we see that several vendors highlight that their MODEMs include an embedded TCP/IP stack. This makes me wonder: when we are using embedded Linux which already contains a TCP/IP stack and connects using PPP, will it make use of the stack included in the GPRS MODEM at all? My current assumption is that the stack is included for use with tiny microcontroller OS that do not supply their own stack. Also some of the MODEMs allow for running small applications IN the MODEM baseband processor which could explain the embedded stack... So: is the TCP/IP stack supplied by the GPRS MODEM superfluous when using it with an HL OS or did I overlook something?

    Read the article

  • Time series in R

    - by Christian Stade-Schuldt
    Hi, I am tracking my body weight in a spread sheet but I want to improve the experience by using R. I was trying to find some information about time series analysis in R but I was not succesful. The data I have here is in the following format: date - weight - body-fat-percentage - water-percentage e.g. 10/08/09 - 84.30 - 18.20 - 55.3 What I want to do plot weight and exponential moving average against time How can I achieve that?

    Read the article

  • Storing Icons and Sql with PHP

    - by Ole Jak
    So I have a simple Apache with MySql I am developing a PHP app. I have Users Table in my DB. I vant to let them store Icons. My question Is what's the best way of attaching such data as icons (100-250kb's) to DB - Is it beter to store them Inside DB or store them as File and some how attaching links to icons into DB. What's the best way? Are there any classes that automate this process (of attaching such data to DB)?

    Read the article

  • SQL Stored Queries - use result of query as boolean based on existence of records

    - by Christian Mann
    Just getting into SQL stored queries right now... anyway, here's my database schema (simplified for YOUR convenience): member ------ id INT PK board ------ id INT PK officer ------ id INT PK If you're into OOP, Officer Inherits Board Inherits Member. In other words, if someone is listed on the officer table, s/he is listed on the board table and the member table. I want to find out the highest privilege level someone has. So far my SP looks like this: DELIMITER // CREATE PROCEDURE GetAuthLevel(IN targetID MEDIUMINT) BEGIN IF SELECT `id` FROM `member` WHERE `id` = targetID; THEN IF SELECT `id` FROM `board` WHERE `id` = targetID; THEN IF SELECT `id` FROM `officer` WHERE `id` = targetID; THEN RETURN 3; /*officer*/ ELSE RETURN 2; /*board member*/ ELSE RETURN 1; /*general member*/ ELSE RETURN 0; /*not a member*/ END // DELIMITER ; The exact text of the error is #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT id FROM member WHERE id = targetID; THEN IF SEL' at line 4 I suspect the issue is in the arguments for the IF blocks. What I want to do is return true if the result-set is at least one -- i.e. the id was found in the table. Do any of you guys see anything to do here, or should I reconsider my database design into this:? person ------ id INT PK level SMALLINT

    Read the article

  • [Glade] button problem

    - by Christian
    Hi, i'm using glade to designa a interface for my program written in C but i have some problem with the buttons. Can someone explain me how to set in glade an action for a button? i mean, i wrote a function in my code but i don't know how to associate it to the graphic... i set i the Signal box the GtkButton activate and i chose "on_button_activate" and in "user data" i put the name of my function but when i copile it this is the terminal answare: chris@chris-laptop:~/Scrivania$ ./provaGrafica (provaGrafica:3139): Gtk-WARNING **: Could not lookup object funzione_esporta on signal activate of object button4 (provaGrafica:3139): Gtk-WARNING **: Could not find signal handler 'on_button4_activate' chris@chris-laptop:~/Scrivania$ and obviusly the button do not work thanks

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >