Daily Archives

Articles indexed Friday January 14 2011

Page 10/36 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Why should I care about RVM's Gemset feature when I use Bundler?

    - by t6d
    I just don't get it. I thought, Bundler was developed to resolve version conflicts between gems. So that I just have to require "bundler/setup" and everything is fine, knowing that Bundler will load the correct versions of all my gems and their dependencies. Now, RVM is great for managing multiple Rubies, I know, but why should I care about the Gemset feature? Do I miss something here? Can it make my development even easier? Maybe, some of you can give me some hints on the perfect RVM + Bundler workflow for both, development and production. I also don't know when RVM starts switching to another Ruby. I know that I can have an .rvmrc file in my project, but do I have to cd to this directory so that the switch happens? Furthermore, I usually use Passenger for development since, thanks to the Passenger.prefpane, integration in Mac OS is great. Can I still do that with RVM or is there a better way to do it? Does Passenger recognize .rvmrc files and switch to the correct Gemset?

    Read the article

  • Extract images link from html text string

    - by Jaj
    I want to extract all images link to so I can utilize all images freely. how to do in asp.net c# <div> <img src="/upload/Tom_Cruise-242x300.jpg" alt="Tom_Cruise-242x300.jpg" align="left" border="0" height="300" width="242"> sample text sample text sample text sample text <img src="http://www.sharicons.com/images/rss_icon.jpg" alt="Icon" align="left" border="0" height="100" width="100"> sample text sample text sample text sample text sample text sample text sample text sample text</div>

    Read the article

  • Django - Passing arguments to models through ForeignKey attributes

    - by marshall
    I've got a class like this: class Image (models.Model): ... sizes = ((90,90), (300,250)) def resize_image(self): for size in sizes: ... and another class like this: class SomeClassWithAnImage (models.Model): ... an_image = models.ForeignKey(Image) what i'd like to do with that class is this: class SomeClassWithAnImage (models.Model): ... an_image = models.ForeignKey(Image, sizes=((90,90), (150, 120))) where i'm can specify the sizes that i want the Image class to use to resize itself as a argument rather than being hard coded on the class. I realise I could pass these in when calling resize_image if that was called directly but the idea is that the resize_image method is called automatically when the object is persisted to the db. if I try to pass arguments through the foreign key declaration like this i get an error straight away. is there an easy / better way to do this before I begin hacking down into django?

    Read the article

  • Is it possible to simulate TMenuBreak functionality with Dev Express TdxBarSubItems?

    - by mcmar
    In my application I'm dynamically adding new TdxBarSubItems based off of a SQL query. In some cases the result set is rather large so the menu fills the entire screen and sometimes has a down arrow to scroll the list. In a previous version of the code before switching to Dev Express, I was able to add TMenuBreak objects to make the list divide into columns. Is there a way to do this with Dev Express components?

    Read the article

  • How to debug iPhone project crash when there is no error message

    - by teepusink
    Hi, I am doing this iPhone app that works fine on the simulator. However, when I run it on a device in debug mode, it just crash without any error messages. How can I debug that? I heard about a flag we can set to help with this kind of situation but not sure what that flag is and how to set it. If I'm not mistaken I think what that flag does is put a break point automatically prior to crash. Thanks, Tee

    Read the article

  • Why does this work?

    - by jsoldi
    I was googling trying to find a way to call Control.DataBindings.Add without using a string literal but getting the property name from the property itself, which I think would be less error prone, at least for my particular case, since I normally let Visual Studio do the renaming when renaming a property. So my code would look something like DataBindings.Add(GetName(myInstance.myObject)... instead of DataBindings.Add("myObject".... So I found this: static string GetName<T>(T item) where T : class { var properties = typeof(T).GetProperties(); if (properties.Length != 1) throw new Exception("Length must be 1"); return properties[0].Name; } That would be called, assuming I have a property called One, this way: string name = GetName(new { this.One }); which would give me "One". I have no clue why does it work and whether is safe to use it or not. I don't even know what that new { this.One } means. And I don't know on which case could it happens that properties.Length is not 1. By the way, I just tested to rename my property One to Two and Visual Studio turned new { this.One } into new { One = this.Two }, which when used with the GetName function gave me "One", which make the whole thing useless since the name I would be passing to Control.DataBindings.Add would be still "One" after renaming the property.

    Read the article

  • How to read data from SharePoint list using View RSS feeds to external site?

    - by James123
    I want export data from SharePoint lists (discussion forums, documents library, calendar) information to external site using RSS. Right now our SharePoint sites built on FBA based, so all sites are behind login page. Now I export each updates from these lists to our another external public site (anonymous). I know we have default View RSS Feed option. But that is not working for all readers like Google Reader, etc. Is there any free developer (open source) tool supports in this? Please share some ideas.

    Read the article

  • How to handle alpha in a manual "Overlay" blend operation?

    - by quixoto
    I'm playing with some manual (walk-the-pixels) image processing, and I'm recreating the standard "overlay" blend. I'm looking at the "Photoshop math" macros here: http://www.nathanm.com/photoshop-blending-math/ (See also here for more readable version of Overlay) Both source images are in fairly standard RGBA (8 bits each) format, as is the destination. When both images are fully opaque (alpha is 1.0), the result is blended correctly as expected: But if my "blend" layer (the top image) has transparency in it, I'm a little flummoxed as to how to factor that alpha into the blending equation correctly. I expect it to work such that transparent pixels in the blend layer have no effect on the result, opaque pixels in the blend layer do the overlay blend as normal, and semitransparent blend layer pixels have some scaled effect on the result. Can someone explain to me the blend equations or the concept behind doing this? Bonus points if you can help me do it such that the resulting image has correctly premultiplied alpha (which only comes into play for pixels that are not opaque in both layers, I think.) Thanks! // factor in blendLayerA, (1-blendLayerA) somehow? resultR = ChannelBlend_Overlay(baseLayerR, blendLayerR); resultG = ChannelBlend_Overlay(baseLayerG, blendLayerG); resultB = ChannelBlend_Overlay(baseLayerB, blendLayerB); resultA = 1.0; // also, what should this be??

    Read the article

  • XML, XPATH adding values

    - by user575373
    hello, i have XML files which contain records with the following structure: <payment contractType="1"> <income type="0"> <gr code="1" amount="1506.00"/> <gr code="4" amount="35.00"/> <gr code="10" amount="288.14"/> <de code="3011300" amount="138.72"/> <de code="3081100" amount="48.81"/> <de code="3082400" amount="109.84"/> </income> <netAmount1 value="765.00"/> <netAmount2 value="765.00"/> </payment> each file has many records of type payment and i want the final xml to contain one payment record by adding all the amount values for every differrent code value I think XPath can be used for this, but I never used it before , could someone show me some Java (or else) code for this?

    Read the article

  • ActionListener problem

    - by thegamer
    Hello, i am trying to make an actionListener on a button in another button which has also an actionlistener and i just couldn't figure it out for some way. I am trying to make an action on the 2nd button but i couldn't figure it out.If anyone helps me i'd appreciate! here is the code below: import java.awt.; import java.awt.event.; import javax.swing.; import java.io.; import java.util.*; public class basic implements ActionListener{ public static void main(String[] args) { basic process = new basic (); } public basic(){ JFrame fan = new JFrame("Scheme"); JPanel one = new JPanel(new BorderLayout()); fan.add(one); JPanel uno = new JPanel(); uno.setLayout(new BoxLayout(uno, BoxLayout.Y_AXIS)); JButton addB = new JButton("first choice"); addB.setAlignmentX(Component.CENTER_ALIGNMENT); uno.add(addB); addDButton.setActionCommand("hehe"); addDButton.addActionListener(this); one.add(uno,BorderLayout.CENTER); fan.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fan.setSize(500,700); fan.setLocationByPlatform(true); fan.setVisible(true); } public void actionPerformed(ActionEvent evt) { JPanel markP = new JPanel(new FlowLayout(FlowLayout.RIGHT,10,20)); JDialog dialog = new JDialog((JFrame)null); dialog.getContentPane().add(markP,BorderLayout.CENTER); if (evt.getActionCommand().equals("hehe")) { JLabel title = new JLabel("Proceed"); title.setFont(new Font("Arial",Font.BOLD,15)); markP.add(title,BorderLayout.NORTH); JButton exit = new JButton("Exit"); markP.add(exit); //here i want to create another actionListener on the exit button only without affecting the other content which is in the button "addB " so that when i click on the addB button the J dialog pops up, and than when i click on exit button the program will return to the menu.I couldn't figure it out. dialog.toFront(); dialog.setModal(true); dialog.pack(); // dialog.setLocationRelativeTo(null); // dialog.setVisible(true); } // here the code goes on but the problem is that of the actionListener which is concerned.

    Read the article

  • scriptaculous drop down menu not working in IE

    - by Gary
    I'm using the dropdown menu from http://www.wappler.eu/swdropdownmenu/ and it works fine in all browsers except IE.. the demo on the website works in IE, and the only thing i've changed is the styling.. mine is at http://www.futureworkinstitute.com/2010/ - at first i thought it might have been a conflict between scriptaculous/prototype/jquery, but even after removing other JS, it still doesnt work.

    Read the article

  • POP Forums v9 Beta 1 for ASP.NET MVC 3 posted to CodePlex!

    - by Jeff
    As promised, I posted a beta build of my forum app for ASP.NET MVC 3. Get the new goodies here: http://popforums.codeplex.com/releases/view/58228 This is the first beta for the ASP.NET MVC 3 version of POP Forums. It is nearly feature complete, and ready for testing and feedback. For previous release notes, look here, here and here.Check out the live preview: http://preview.popforums.com/ForumsSetup instructions are on the home page of this project. The new hotness in the beta, or what has been done since the last preview: All views converted to use Razor E-mail subscription/notification of new posts New post indicators/mark read buttons Permalinks to posts Jump to newest post (from new post indicators) Recent topics Favorite topics Moderator functions for topics (pin/close/delete, plus move and rename) Search, ported from v8. Not a ton of optimization here, or new unit testing, but the old version worked pretty well User posts (topics the user posted in) Forgot password Vanity items (signatures and avatars) Hide vanity items per user preference Some minor data caching where appropriate A little bit of UI refinement Lots-o-bug fixes Lots-o-unit tests What's next? The plan between now and the next beta is as follows: Continue working through features/tasks, and fix bugs as they're reported Integrate the forum into a real, production site Refine the UI Refactor as much as possible... the code organization is not entirely logical in some places After the second beta, a release candidate will follow, with a real "final" release after that. Subsequent releases should come relatively frequently and without a lot of risk. The trick in building this thing has been that it mostly tossed the previous WebForms version, which was all full of crusties. The time table for this is a little harder to pin down, as day jobs and families will have their effect. Other notes Refactoring will be a priority. As the features of MVC have evolved, so have my desires to use it in a fashion that makes things clear and easy to follow. I don't even know if anyone will ever start mucking around in the code, but on the off chance they do, I'd like what they find to not suck. Other nice-to-haves are builds to target Windows Azure and SQL CE. A nice setup UI would be super too. I think the ASP.NET MVC world has gone long enough without a decent forum.The biggest challenge that I've found is making the forum something that can be dropped in any app. While it does rope its views into an area, areas are mostly just routing details. I haven't thought of a clever way yet to limit dependency injection, for example, to just the forum bits. I mean, everyone should be using Ninject, but how realistic is that? ;)How much time and effort should you spend on POP Forums in its current state? Change is inevitable, but at this point I'm reasonably committed to not changing the database schema. I really think it will stay as-is. All bets are off for the various interfaces throughout the app, but the data should generally resist change. It's not even that different from v8, which was one of the original goals because I didn't want to rewrite SQL or introduce a new ORM or whatever. My point is that if you wanted to build a site around this today, even though it's not entirely functional, I think it's low risk in terms of data loss. I can't vouch for whether or not you know what you're doing.I've been having some chats with people lately about quoting posts, and honestly there has to be something better and straight forward. That continues to be a holy grail of mine, and some day, I hope to find it.Enjoy... it's starting to feel more real every day!

    Read the article

  • Reset ACLs in NFS4/ZFS network share

    - by Christoph
    How can I reset the ACLs on a ZFS file system on OpenIndiana that is exported via NFS4 and replace it with inherited permissions? Basically, I want to do the equivalent of icacls "C:\path\to\folder" /reset /T /C on Windows on this machine. However, neither the chmod command on OpenIndiana nor the nfs4_setacl seems to allow for deleting all ACLs although the client correctly interprets inherited ACLs if a node does not have an own one.

    Read the article

  • FreeRADIUS Default Answer

    - by jinanwow
    We are using FreeRADIUS with a MySQL database, authenticating users. We ran into an issue where are MySQL database was slow causing the max number of threads to be reached. The issue with this is, when the server couldn't answer the requests as there were no threads avaiable, it sent the response of Access-Reject to the clients. Our devices cache client connections and periodically checks with the server to see if they should still be allowed or to remove them. The equipment is designed that if there is no response from the server and a client is connected it will remain connected. The issue is, when the radius server is at its max threads, its default answer is to send access-reject (verified via packet capture), however we would like to change the default behavior to just ignore the request (keeping the clients connected). We have fixed the MySQL database issue for now, but I would like to change the default from Access-Reject, to just ignore the client altogeather. I have done research, but not able to find an answer to the question. Thanks in Advance.

    Read the article

  • GlassFish v2.1 -- getting Application Client and Eclipselink to work together?

    - by Nick
    We are trying to use Eclipselink 1.1 with Glassfish v2.1. Following the instructions on: http://wiki.glassfish.java.net/Wiki.jsp?page=FaqEclipseLinkGlassFishV2 I adapted the instructions for the appclient script on linux by adding the lines: APPCPATH=$APPCPATH:$AS_INSTALL/lib/eclipselink-1.1.1.jar export APPCPATH to the appclient shell script. This however is not working. On running the application client (using Glassfish's webstart), I get the error: WARNING: "IOP00810257: (MARSHAL) Could not load class org.eclipse.persistence.indirection.IndirectList" Anyone else succeed in getting GF v 2.1 to work with eclipselink? or any ideas on what I might be doing wrong? I found this bug report: http s://glassfish.dev.java.net/issues/show_bug.cgi?id=8204 (New users can't post more than 1 link, so remove the space between 'http' and 's'.) Where Tim Quinn (tjquinn) said: App client container support for persistence is not yet in place I think this refers only to Glassfish v3, and it should be working in Glassfish v2. Is this correct? I'm working on the assumption that this will work once the ACC knows where to find the eclipselinks jar. Thanks in advance, Nick.

    Read the article

  • Join performance on MyISAM and InnoDB tables

    - by j0nes
    I am thinking about converting some tables from MyISAM to InnoDB in my mysql server. The tables will certainly benefit from the change because a lot of write requests come to these tables, while there are also quite a lot of read request at the same time. However, they are often joined together with some tables that almost don't get any writes. Is there a performance penalty when joining together MyISAM and InnoDB tables or should everything work fine? Second question: During backups at night, I am copying data from the InnoDB tables to MyISAM tables for archiving purposes. In these backups, a lot of write-requests happen, however there is almost no read from these archive tables. Would these tables also benefit from using InnoDB or is this just a waste of space and RAM?

    Read the article

  • Protocol Security With PPTP

    - by why
    I find these words in pptp client source : Summary by Peter Mueller PPTP is known to be a faulty protocol. The designers of the protocol, Microsoft, recommend not to use it due to the inherent risks. Lots of people use PPTP anyway due to ease of use, but that doesn't mean it is any less hazardous. The maintainers of PPTP Client and Poptop recommend using OpenVPN (SSL based) or IPSec instead. (Posted on [1]2005-08-10 to the [2]mailing list) But as far as i know, there are many people use PPTP as a VPN, because there is no need to install client on windows, what do you think about pptp ?

    Read the article

  • Mercurial internal Setup on Windows 7 - Exception happened during processing of request from ...

    - by Sad0w1nL1ght
    Hy, i have 1 central repository and many locals. On my machine i have local and a central repository too. I can make clone/commit/update/push/pull very easy between the local and central repository on my local machine. but when i want to make a clone from another machine it gets an error. listening at http://MyLocalMachine:8000/ (bound to *:8000) ---------------------------------------- Exception happened during processing of request from ('192.168.0.194', 49319) Traceback (most recent call last): File "SocketServer.pyc", line 558, in process_request_thread File "SocketServer.pyc", line 320, in finish_request File "mercurial\hgweb\server.pyc", line 47, in __init__ File "SocketServer.pyc", line 615, in __init__ File "BaseHTTPServer.pyc", line 329, in handle File "BaseHTTPServer.pyc", line 323, in handle_one_request File "mercurial\hgweb\server.pyc", line 79, in do_GET File "mercurial\hgweb\server.pyc", line 70, in do_POST File "mercurial\hgweb\server.pyc", line 63, in do_write File "mercurial\hgweb\server.pyc", line 127, in do_hgweb File "mercurial\hgweb\hgweb_mod.pyc", line 86, in __call__ File "mercurial\hgweb\hgweb_mod.pyc", line 118, in run_wsgi ErrorResponse ---------------------------------------- The command line wich started the central repo: hg serve -R TT -n TTZoli The command from remote machine for cloning: hg clone --pull http://MyLocalMachine:8000/TT Config for the central repo: [ui] username = MyLocalUserName username = test <[email protected]> with this user i'm trying to acces the central repo [web] push_ssl = false Config for the remote repo: [ui] username = test <[email protected]> [web] push_ssl = false I'm not sure if it's relevant,my firewall is turned off on both machines, and the files in /hg folder are not versioned on the server, except hgignore. Could you please suggest some ideas? What could be the problem? Thanks in advance!

    Read the article

  • Minimal slim way to create and run an internal RSS feed

    - by tharkun
    I have the idea to create a very simple tech update feed for internal collaboration in our company. For that I'm looking for the easiest way of writing messages which then get syndicated as RSS feed. Something like a mini blog tool. The simpler the better. Enter title, body and send, all subscribers of the feed get the new message. Sort of like Twitter without using Twitter. [edit]It has to be a purely web based solution![/edit] Any tips, ideas, experiences?

    Read the article

  • No display on computer due to connection problem

    - by whamsicore
    My computer is booting but has no display. The optical drive has power, but the USB doesn't, so I figured that I had a broken motherboard. However I tried to boot my computer again laying flat, and it worked fine for two seconds, and then froze like it did the first time. It had no display after that. I have come to the conclusion that it is a connection problem (someone had a similar problem on one of the online forums).

    Read the article

  • display values within stacked boxes of rowstacked histograms in gnuplot?

    - by gojira
    I am using gnuplot (Version 4.4 patchlevel 2) to generate rowstacked histograms, very similar to the example called "Stacked histograms by percent" from the gnuplot demo site at http://www.gnuplot.info/demo/histograms.html I want to display the values of each stacked box within it. I.e. I want to display the actual numerical value (in percent and/or the absolute number) of each box. How can I do that?

    Read the article

  • Sécurité informatique : Cours et exercices corrigés, critique par Vallée Nicolas et Benwit

    Bonjour La rédaction de DVP a lu pour vous l'ouvrage suivant: Sécurité informatique : Cours et exercices corrigés de Gildas Avoine, Pascal Junod, Philippe Oechslin paru aux Éditions Vuibert [IMG]http://ecx.images-amazon.com/images/I/411odAhqrbL._SS500_.jpg[/IMG] Citation: Les attaques informatiques sont aujourd'hui l'un des fléaux de notre civilisation. Chaque semaine amène son lot d'alertes concernant ...

    Read the article

  • The internal storage of a DATETIMEOFFSET value

    - by Peter Larsson
    Today I went for investigating the internal storage of DATETIME2 datatype. What I found out was that for a datetime2 value with precision 0 (seconds only), SQL Server need 6 bytes to represent the value, but stores 7 bytes. This is because SQL Server add one byte that holds the precision for the datetime2 value. Start with this very simple repro declare    @now datetimeoffset(7) = '2010-12-15 21:04:03.6934231 +03:30'   select     cast(cast(@now as datetimeoffset(0)) as binary(9)),            cast(cast(@now as datetimeoffset(1)) as binary(9)),            cast(cast(@now as datetimeoffset(2)) as binary(9)),            cast(cast(@now as datetimeoffset(3)) as binary(10)),            cast(cast(@now as datetimeoffset(4)) as binary(10)),            cast(cast(@now as datetimeoffset(5)) as binary(11)),            cast(cast(@now as datetimeoffset(6)) as binary(11)),            cast(cast(@now as datetimeoffset(7)) as binary(11)) Now we are going to copy and paste these binary values and investigate which value is representing what time part. Prefix  Ticks       Ticks         Days    Days    Suffix  Suffix  Original value ------  ----------  ------------  ------  ------  ------  ------  ------------------------ 0x  00  0CF700             63244  A8330B  734120  D200       210  0x000CF700A8330BD200 0x  01  75A609            632437  A8330B  734120  D200       210 0x0175A609A8330BD200 0x  02  918060           6324369  A8330B  734120  D200       210  0x02918060A8330BD200 0x  03  AD05C503        63243693  A8330B  734120  D200       210  0x03AD05C503A8330BD200 0x  04  C638B225       632502470  A8330B  734120  D200       210  0x04C638B225A8330BD200 0x  05  BE37F67801    6324369342  A8330B  734120  D200       210  0x05BE37F67801A8330BD200 0x  06  6F2D9EB90E   63243693423  A8330B  734120  D200       210  0x066F2D9EB90EA8330BD200 0x  07  57C62D4093  632436934231  A8330B  734120  D200       210  0x0757C62D4093A8330BD200 Let us use the following color schema Red - Prefix Green - Time part Blue - Day part Purple - UTC offset What you can see is that the date part is equal in all cases, which makes sense since the precision doesn't affect the datepart. If you add 63244 seconds to midnight, you get 17:34:04, which is the correct UTC time. So what is stored is the UTC time and the local time can be found by adding "utc offset" minutes. And if you look at it, it makes perfect sense that each following value is 10 times greater when the precision is increased one step too. //Peter

    Read the article

  • SQL*Plus??? - SPOOL??????????? (????? ???Tips-4)

    - by Yuichi.Hayashi
    SPOOL????????????????????? SQL*Plus?????10.1??? ????????????????????????????? ??:spool ??????? { cre[ate] | rep[lace] | app[end] } ??????replace??????????????????????????? ? ???????????????????????? ????10.1???????? ???create?append???????????????? create????? create??????????????????? ???????????? SQL spool aaa.txt cre SP2-0771: ????"aaa.txt"?????????? ???????"SPOOL filename[.ext] REPLACE"???????????spool??????????? append????? append???????????????????? ????????????????????????? ??v$??????????????????????????????????????????????????? ?)spool???????????????????????????????????????? (Written by Hiroyuki Nakaie)

    Read the article

  • PowerPivot Workshop: new announcement and early bird expiring soon #ppws #PowerPivot

    - by AlbertoFerrari
    As always, I am a bit later than Marco in producing news. Nevertheless, I am very excited to tell you  the new date for the Frankfurt workshop on PowerPivot: February 21-22, 2011 . Save the date and find all the relevant information on www.powerpivotworkshop.com , where you can also register a seat for the workshop with the early bird rate. Moreover, the early bird for the London date is quickly approaching: it will expire on January, 17 ., Thus, hurry up and don’t miss the opportunity to save...(read more)

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >