Search Results

Search found 190 results on 8 pages for 'niko nik'.

Page 5/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • updating rails to 2.3.6

    - by Nik
    can you update your 2.3.5 app with just "gem update rails" and change the version # in environment.rb? I did that and lots of errors came out like in console just typing Post.all would show "undefined method `retrieve_connection' for nil:NilClass". Any ideas? By the way, I have these gems in my environment.rb config.gem "aws-s3", :version = "= 0.6.2", :lib = "aws/s3" config.gem "less" config.gem "authlogic" config.gem "be9-acl9", :source = "http://gems.github.com", :lib = "acl9" config.gem "hash_extension" config.gem "prawn"

    Read the article

  • How do I read the manifest file for a webapp running in apache tomcat?

    - by Nik Reiman
    I have a webapp which contains a manifest file, in which I write the current version of my application during an ant build task. The manifest file is created correctly, but when I try to read it in during runtime, I get some strange side-effects. My code for reading in the manifest is something like this: InputStream manifestStream = Thread.currentThread() .getContextClassLoader() .getResourceAsStream("META-INFFFF/MANIFEST.MF"); try { Manifest manifest = new Manifest(manifestStream); Attributes attributes = manifest.getMainAttributes(); String impVersion = attributes.getValue("Implementation-Version"); mVersionString = impVersion; } catch(IOException ex) { logger.warn("Error while reading version: " + ex.getMessage()); } When I attach eclipse to tomcat, I see that the above code works, but it seems to get a different manifest file than the one I expected, which I can tell because the ant version and build timestamp are both different. Then, I put "META-INFFFF" in there, and the above code still works! This means that I'm reading some other manifest, not mine. I also tried this.getClass().getClassLoader().getResourceAsStream(...) But the result was the same. What's the proper way to read the manifest file from inside of a webapp running in tomcat? Edit: Thanks for the suggestions so far. Also, I should note that I am running tomcat standalone; I launch it from the command line, and then attach to the running instance in Eclipse's debugger. That shouldn't make a difference, should it?

    Read the article

  • Split html text in a SEO friendly manner

    - by al nik
    I've some html text like <h1>GreenWhiteRed</h1> Is it SEO friendly to split this text in something like <h1><span class="green">Green</span><span class="white">White</span><span class="red">Red</span></h1> Is the text still ranking well and is it interpreted as a single word 'GreenWhiteRed'?

    Read the article

  • Upgrade from Delphi 2007 to Delphi 2010?

    - by Nik
    What should I worry about if I move to Delphi 2007 to 2010? I've checked this article and there was a lot of interesting stuff but not precisely for this jump that I need. To clarify my question and situation: I have all 3td party components' code. I will need the unicode, but not this year. I need win 7 support - themes, form resize problems and etc. I will be happy to have a dissent help system. Is ADO (dbGO) improved? What headache to expect? Thanks!

    Read the article

  • Setting environment variables in OS X /etc/launchd.conf

    - by al nik
    I'm trying to set some env variable in OS X 10.6 (/etc/launchd.conf) setenv M2_HOME /usr/share/maven setenv M2 $M2_HOME/bin setenv MAVEN_OPTS '-Xms256m -Xmx512m' M2 and MAVEN_OPTS are not working. I tried with something like setenv MAVEN_OPTS -Xms256m\ -Xmx512m but still it doesn't work. Any idea of what is the correct synthax? Thanks

    Read the article

  • Using LCD with Arduino

    - by Nik
    Hi, Is it possible to use any LCD with arduino or I need to stick to some for which the libraries are available. I'm just starting out with arduino and know nothing about interfacing LCDs with arduino. I'm planing to buy Old IPhone LCD as they are cheap and big enough to do something useful with them. Also to use iPhone LCD do I need to add some extra circuit or directly plugging iPhone LCD into arduino will work? I don't care about the touch feature right now.

    Read the article

  • Spring - How do you set Enum keys in a Map with annotations

    - by al nik
    Hi all, I've an Enum class public enum MyEnum{ ABC; } than my 'Mick' class has this property private Map<MyEnum, OtherObj> myMap; I've this spring xml configuration. <util:map id="myMap"> <entry key="ABC" value-ref="myObj" /> </util:map> <bean id="mick" class="com.x.Mick"> <property name="myMap" ref="myMap" /> </bean> and this is fine. I'd like to replace this xml configuration with Spring annotations. Do you have any idea on how to autowire the map? The problem here is that if I switch from xml config to the @Autowired annotation (on the myMap attribute of the Mick class) Spring is throwing this exception nested exception is org.springframework.beans.FatalBeanException: Key type [class com.MyEnum] of map [java.util.Map] must be assignable to [java.lang.String] Spring is no more able to recognize the string ABC as a MyEnum.ABC object. Any idea? Thanks

    Read the article

  • scrollTo inner div only

    - by Nik
    I have a page with two scroll bars. I am using the scrollTo jquery plugin to jump to other areas on the same page. The problem is I only want the inner div to scrollTo and the outer div to remain at the top of the screen. Development site link click here This is the script $(".jump > li").click(function() { var qu = $(this).attr("id"); var an = "#" + qu.replace("q","a"); // step 8 $.scrollTo(an, {duration: 800, axis:"y"}); }); Any ideas?

    Read the article

  • Log4j Relative Path to Tomcat7 Log Directory File Not Found

    - by Nik
    I have this log4j XML file: <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="gemFile" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="file:${catalina.home}/logs/GEM.log" /> <param name="MaxBackupIndex" value="5" /> <param name="MaxFileSize" value="3MB" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%t] %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %c{1} - %m%n" /> </layout> </appender> <root> <priority value ="info" /> <appender-ref ref="gemFile" /> </root> </log4j:configuration> ${catalina.home} resolves to C:\Apps\Apache\Tomcat7. When I deploy my WAR file, I get log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: file:C:\Apps\Apache\Tomcat7\logs\GEM.log (The filename, directory name, or volume label syntax is incorrect) stack trace... It is true that the log file does not exist (the folder structure does), but if I set the file directly to that path (<param name="File" value="C:/Apps/Apache/Tomcat7/logs/GEM.log" />) it works fine. Why can't I use the replacement string?

    Read the article

  • Chrome fadeIn scroll bar issue

    - by Nik
    Bikram Website If you view this page in the latest version of chrome you will notice when you click on an instructors name the scroll bar is black when fading in. It is not a webkit issue as safari is fine. Anybody know why chrome does it?

    Read the article

  • Hibernate - how to map an EnumSet

    - by al nik
    Hi all, I've a Color Enum public enum color { GREEN, WHITE, RED } and I have MyEntity that contains it. public class MyEntity { private Set<Color> colors; ... Do you know how to map this in the relative Hibernate hbm.xml? Do I need a UserType or there's an easiest way? Thanks

    Read the article

  • How do I get a bundle reference from inside of a plugin with carbon?

    - by Nik Reiman
    I'm writing a C++ plugin in Mac OS X using the Carbon framework (yeah, yeah, I know, Apple is deprecating Carbon, but at the moment I can't migrate this code to Cocoa). My plugin gets loaded by a master application, and I need to get a CFBundleRef reference to my plugin so that I can access it's resources. The problem is, when I call CFBundleGetMainBundle() during my plugin's initialization routines, that returns a reference to the host's bundle reference, not the plugin's. How can I get a reference to my plugin's bundle instead? Note: I would rather not use anything determined at compile-time, including calling CFBundleGetBundleWithIdentifier() with a hard-coded string identifier.

    Read the article

  • jquery add a fade to an .addClass

    - by Nik
    How do I fade .addClass in and out. Here is the link - www.aus-media.com/dev/site_BYJ/new-students/ and here is the code - $(document).ready(function() { $('#menu li#Q_01,#menu li#Q_03,#menu li#Q_05,#menu li#Q_07,#menu li#Q_09,#menu li#Q_11,#menu li#Q_13').hover(function() { $(this).addClass('pretty-hover'); }, function() { $(this).removeClass('pretty-hover'); }); }); $(document).ready(function() { $('#menu li#Q_02,#menu li#Q_04,#menu li#Q_06,#menu li#Q_08,#menu li#Q_10,#menu li#Q_12').hover(function() { $(this).addClass('pretty-hover_01'); }, function() { $(this).removeClass('pretty-hover_01'); }); }); Thanks

    Read the article

  • Is Software Engineering Dead? [closed]

    - by nik
    Right from Jeff's blog: Software Engineering: Dead? I was utterly floored when I read this new IEEE article by Tom DeMarco (pdf). See if you can tell why. He quotes DeMarco, "I'm gradually coming to the conclusion that software engineering is an idea whose time has come and gone". Further, "What DeMarco seems to be saying -- and, at least, what I am definitely saying -- is that control is ultimately illusory on software development projects." I am writing these lines without context to invoke reading of the related subject. What are the views of the programming community here? I have started to realize that a community wiki is not getting the right amount of participation here. That is the reason I left this question out in the open, while still contemplating a change to CW. It was closed once, and I thought that was the end of it. But, now I see it was reopened and has more answers (all of which I have not yet read). However, I see a lot of CW requests and am forced to reconsider that. This is how I intend to make the CW decision here. There is a comment by Neil Butterworth requesting a CW at 12 upvotes -- "should be community wiki" There is a comment by Lance Roberts requesting no CW at 0 upvotes -- "+1 for not putting it in community wiki" The difference is 12 for a CW request at the moment If this difference becomes 5 more (that is 17), I'll move this question to CW, and it will not return back from there Of course, there is also a close vote at the moment; the question may be closed again.

    Read the article

  • SQLite and PostgreSql longtext

    - by Nik
    Hello all, Does anyone know how to change a column in SQLite and PostgreSQL to LONGTEXT? I have done so in MySQL successfully with: "ALTER TABLE projects MODIFY description LONGTEXT;" But this clause doesn't seem to work on SQLite. I tried hard to find documentation on PostgreSQL, but that site's format really makes people puke. SQLite's website is better but the only command I find relevant, alter table, doesn't seem to support changing column data type at all. ( infact, it doesn't even allow changing column name!!!) Thanks all!

    Read the article

  • mysql error in query for timestamp interval

    - by nik parsa
    I have voting_IP table as follow: +-----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+----------------+ | ip_id | int(11) | NO | PRI | NULL | auto_increment | | mes_id_fk | int(11) | YES | MUL | NULL | | | ip_add | varchar(40) | YES | | NULL | | | timestamp | datetime | YES | | NULL | | +-----------+-------------+------+-----+---------+----------------+ I want to run this query which has errors and I don't know how to correct it? $ip_sql=mysql_query("select ip_add from Voting_IP where mes_id_fk='$id' and ip_add='$ip' and timestamp > (DATE_ADD(now(), INTERVAL -1 HOUR);)"); I also tried this one: $ip_sql=mysql_query("select ip_add from Voting_IP where (mes_id_fk='$id' and ip_add='$ip' and timestamp > (DATE_ADD(now(), INTERVAL -1 HOUR);))");

    Read the article

  • Compass, Haml alongside Sass installation took over ERB, need to reverse

    - by Nik
    Hi all, I've been trying out Compass for a few days now, and just now I ran into some strange problem: The past few days, as usual, whenever I use my textmate shortcut to create a partial if not already created, that partial will be created in .erb format, but then just now, a few minutes ago, I have no idea what I have done, when I tried to create a new partial, it is prompting me to create one that ends with .haml. when I didn't create that and manually created a .erb partial with all the code that was suppose to go in there, I tried to load the page that uses that partial, it says the partial is missing. That kind of tells me now Rails is looking for Haml templates instead of erb templates. That means all my other partials are useless. And indeed they have become!!! I don't know how this happened. It was working fine with ERB just minutes ago, and suddenly Haml took over and demand all partials be written in it. So my question: Can I keep both Haml and Erb in one Rails application and use mostly erb except for Sass/compass related files? Where in Rails does it state what templating format (erb | haml) it should use? Thanks!

    Read the article

  • Is programming in PHP easy?

    - by nik
    PHP is considered as an easy language of all, Why? Being an php developer, I haven't use any other language that much. And I know with php we gotta learn so much other things also like javascript ajax xml database jquery + all the cms like joomla, drupal, phpbb etc etc. And in web worls u always had to learn injecting maps, calendars, payment gatewaysetc Do learning other languages have these much dependencies? And if php easy than isn't it good thing to have easy language. I can't imagine to built a website in assembly language(Is it possible?)

    Read the article

  • Another IE Issue with AJAX

    - by Nik
    Alright, This code works in every browser except IE (again, to be expected). The code is supposed to refresh based on setInterval, and does so normally in all other browsers except IE, which just doesn't refresh. Can you spot the problem? var nick = document.getElementById("chatnick").value; var sessid = document.getElementById("sessid").value; var room = document.getElementById("roomid").value; function user_read() { $.ajax({ type: "GET", url: "methods.php", data: {method: "u", room: room}, dataType: "html", success: function (data, status, xhr) { $("#userwindow").html(data); setTimeout(user_read, 10000); } }); } function ajax_read() { $.ajax({ type: "GET", url: "methods.php", data: {method: "r", room: room}, dataType: "html", success: function (data, status, xhr) { $("#chatwindow").html(data); setTimeout(ajax_read, 400); } }); } function submit_msg() { var msg = document.getElementById("chatmsg").value; $.ajax({ type: "GET", url: "methods.php", data: {method: "w", room: room, m: msg, n: nick, sessid: sessid}, dataType: "html", success: function (data, status, xhr) { } }); document.getElementById("chatmsg").value = ""; } function keyup(arg1) { if (arg1 == 13) submit_msg(); } setTimeout(function(){ajax_read();}, 400); user_read();

    Read the article

  • do's and don'ts for writing mysql queries

    - by nik
    One thing I always wonder while writing query is that am I writing most optimized query or not? I know certain things like: 1) using SELECT field1, filed2 instead of SELECT * 2) Giving proper indexes to the tables but I am sure there are more things that should be kept in mind for writing queries, since most of the database can only grow more and optimal query will help gr8 in execution time, Can u share some tips and tricks on writing queries?

    Read the article

  • a question about rails general practice with REST, json, and ajax

    - by Nik
    Hi all, I have this question concerning REST I think: I have read a few rest tutorials and the feeling I get from them is that each action in a restful controller tends to be lean and almost single purpose: "Index gives off a collection of a model show gives off one model edit/new a prep place for changing/create a model update/create changes and makes new model deletes removes one model" After reading all these tutorials, rest seems to be to be a means to create an interface for a model, much like active resource type of thing. the mantra seems to be "controller provides data and data only and is also pretty convention over configuration, so expect projects_path to return a bunch of projects" I can understand that, and I like the cleanliness. But here's when I run into some trouble in reality in applying these guidelines: say three models, Project with attrib title, User with attrib name, and Location with attrib address. Say in views/users/index.html.erb, I want to use Ajax to fetch and display a project in a div#project_display when the user clicks on a project element, I know that I can use views/projects/show.js.rjs like this: page.replace_html 'project_display' "#{@project.name}" where in the projects_controller.rb def show @project = Project.find(params[:id]) repsond_to do |format| format.js and other formats... end end I have no problem in doing that for a couple of years now. BUT doesn't that mean that my JS response for the project#show action is LOCkED to present data to div#project_display element and show only whatever I that rjs template says it should show? That's very limiting and doesn't sound very "interface" like. I have never used JSON before or much XML, so I thought, maybe the JS response should send back raw stuff, like JSON and somehow the page on which the ajax request was called has the instruction on what do to with these raw data. That sounds a lot more flexible, doesn't it? Because look back at that exmpale, what if in the views/locations/index.html.erb, I want to do the exact same thing except I want to put the response in div#project_goes_here and the response should be #{project.name} I know this is a trivial change but that's the point: the RJS only allows one template at a time. So I think the JSON route is the way to go, but how does the already loaded page, the one that the ajax call came from, know when or how to "look forward" to incoming data? I read that PrototypeJS has this template thing, I wouldn't mind using it with JSON, but if you can demonstrate this or other means for displaying received-from-ajax data, I am all attention. Thank You

    Read the article

  • Jquery fade and swap an element when clicked which will also relate to an accordian menu

    - by Nik
    You will notice when you click posture 1 the description drops down and images appear on the right. Now when you click posture 2 or posture 3 the images and description change as they should. What I need to do now is - If posture 1 has been clicked and then posture 2 is clicked the posture 1 menu needs to close so that there is only one posture description visible at one time. If I could also make it so that if the current open posture item is clicked so that it closes and there are no open posture descriptions that there also no images displayed on the right. Finally is there a way to make sure only one set of animation images is running, because just say the user goes through all 26 options and they continue to run in the background it may get sluggish (thanks to Nick Craver for bringing that up). At this stage only posture 1, 2 and 3 are available. Ok finally some code - //Description drop-down boxes $(document).ready(function(){ //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click $("h5.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); //Slide up and down on click $("h5.trigger").click(function(){ $(this).next(".toggle_container").slideToggle("slow"); }); }); //Images on the right fade in and out thanks to aSeptik $(document).ready(function(){ $('#section_Q_01,#section_Q_02,#section_Q_03').hide(); $(function() { $('h5.trigger a').click( function(e) { e.preventDefault(); var trigger_id = $(this).parent().attr('id'); //get id Q_## $('.current').removeClass('current').hide(); //add a class for easy access & hide $('#section_' + trigger_id).addClass('current').fadeIn(5000); //show clicked one }); }); }); //Fading pics $(document).ready(function(){ $('.pics').cycle({ fx: 'fade', speed: 2500 }); }); Description boxes - <h5 class="trigger" id="Q_01" ><a href="#">Posture 1 : Standing Deep Breathing :</a></h5> <div class="toggle_container" > <div class="block"> <span class="sc">Pranayama Series</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_02" ><a href="#">Posture 2 : Half Moon Pose With Hands To Feet Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Ardha Chandrasana with Pada-Hastasana</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_03" ><a href="#">Posture 3 : Awkward Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Utkatasana</span> <p class="bold">Benefits:</p> </div> </div> and the images on the right - <div id="section_Q_01" class="01"> <div class="pics"> <img src="../images/multi/poses/pose1/Pranayama._01.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._02.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._03.jpg"/> </div> </div> <div id="section_Q_02" class="02"> <div class="pics"> <img src="../images/multi/poses/pose2/Half_Moon_Pose_04.jpg" /> <img src="../images/multi/poses/pose2/Backward_Bending_05.jpg" /> <img src="../images/multi/poses/pose2/Hands_to_Feet_Pose_06.jpg" /> </div> </div> <div id="section_Q_03" class="03"> <div class="pics"> <img src="../images/multi/poses/pose3/Awkward_01.jpg" /> <img src="../images/multi/poses/pose3/Awkward_02.jpg" /> <img src="../images/multi/poses/pose3/Awkward_03.jpg" /> </div> </div> It would be a bonus if images faded out when another element is clicked... but not a big deal. Thanks for having a look

    Read the article

  • Active User Tracking, PHP Sessions

    - by Nik
    Alright, I'm trying to work on a function for active user counting in an AJAX based application. I want to express the below SQL Query in correct syntax but I'm not sure how to write it. The desired SQL Query is below: SELECT count(*) FROM active WHERE timestamp > time() - 1800 AND nick=(a string that doesn't contain [AFK]) Now, I do understand that time() - 1800 can be assigned to a variable, but how is timestamp > variable and nick that doesn't contain a string written in SQL?

    Read the article

  • Webapp: safetly update a shared List/Map in the AppContext

    - by al nik
    I've Lists and Maps in my WebAppContext. Most of the time these are only read by multiple Threads but sometimes there's the need to update or add some data. I'm wondering what's the best way to do this without incurring in a ConcurrentModificationException. I think that using CopyOnWriteArrayList I can achieve what I want in terms of - I do not have to sync on every read operation- I can safety update the list while other threads are reading it. Is this the best solution? What about Maps?

    Read the article

  • localtime_r supposed to be thread safe, but causing errors in Valgrind DRD

    - by Nik
    I searched google as much as I could but I couldn't find any good answers to this. localtime_r is supposed to be a thread-safe function for getting the system time. However, when checking my application with Valgrind --tool=drd, it consistantly tells me that there is a data race condition on this function. Are the common search results lying to me, or am I just missing something? It doesn't seem efficient to surround each localtime_r call with a mutex, especially if it is supposed to by thread safe in the first place. here is how i'm using it: timeval handlerTime; gettimeofday(&handlerTime,NULL); tm handlerTm; localtime_r(&handlerTime.tv_sec,&handlerTm); Any ideas?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >