Search Results

Search found 409 results on 17 pages for 'guru'.

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

  • Shortcut for adding to List in a HashMap

    - by Damo
    I often have a need to take a list of objects and group them into a Map based on a value contained in the object. Eg. take a list of Users and group by Country. My code for this usually looks like: Map<String, List<User>> usersByCountry = new HashMap<String, List<User>>(); for(User user : listOfUsers) { if(usersByCountry.containsKey(user.getCountry())) { //Add to existing list usersByCountry.get(user.getCountry()).add(user); } else { //Create new list List<User> users = new ArrayList<User>(1); users.add(user); usersByCountry.put(user.getCountry(), users); } } However I can't help thinking that this is awkward and some guru has a better approach. The closest I can see so far is the MultiMap from Google Collections. Are there any standard approaches? Thanks!

    Read the article

  • Redirecting user from an old web to another in Sharepoint

    - by BeraCim
    Hi all: I want to add the ability to redirect users when they visit certain old sites. The URL of the old sites are unknown, but the server name is the same, e.g. Old site url: http://sharepoint/mySite/default.aspx New site url: http://sharepoint/myNewSite/... There are a lot of other pages within mySite, most of which must be redirected to the new site, but there are exceptions (e.g. user can still view the documents within the site). I thought I have to do this programmatically by somehow capturing the http request and read the url myself. Being no sharepoint guru, I had a quick google, and found that writing a web part is prehaps the best alternative for my situation. But I'm just wondering, given my situation and needs, is writing a web part, or something programmatically, really the ideal solution? Or is there a faster and quicker way to achieve what I want using Sharepoint? Thanks.

    Read the article

  • PHP preg_replace() pattern, string sanitization.

    - by Otar
    I have a regex email pattern and would like to strip all but pattern-matched characters from the string, in a short I want to sanitize string... I'm not a regex guru, so what I'm missing in regex? <?php $pattern = "/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i"; $email = 'contact<>@domain.com'; // wrong email $sanitized_email = preg_replace($pattern, NULL, $email); echo $sanitized_email; // Should be [email protected] ?> Pattern taken from: http://fightingforalostcause.net/misc/2006/compare-email-regex.php (the very first one...)

    Read the article

  • PHP Escaping from HTML, faster, cleanner?!

    - by rno
    I've read about it from the php website (http://us3.php.net/manual/en/language.basic-syntax.phpmode.php) Using: echo "<html tag>" is slower and also annoying because you got to escape char like " with \" But what's about using $output = <<< EOF <html code> EOF; Then later on in the code I can use $output .= <<< EOF <some more html code> EOF; then when I want to print it: echo "$output"; I think it's a great idea, but really wonder what you PHP guru think about it. Cheers, rno

    Read the article

  • Can I get a faster output pipe than /dev/null ?

    - by naugtur
    Hi I am running a huge task [automated translation scripted with perl + database etc.] to run for about 2 weeks non-stop. While thinking how to speed it up I saw that the translator outputs everything (all translated sentences, all info on the way) to STDOUT all the time. This makes it work visibly slower when I get the output on the console. I obviously piped the output to /dev/null, but then I thought "could there be something even faster?" It's so much output that it'd really make a difference. And that's the question I'm asking You, because as far as I know there is nothing faster... (But I'm far from being a guru having used linux on a daily basis only last 3 years)

    Read the article

  • C++ cast syntax styles

    - by palm3D
    A question related to Regular cast vs. static_cast vs. dynamic_cast: What cast syntax style do you prefer in C++? C-style cast syntax: (int)foo C++-style cast syntax: static_cast<int>(foo) constructor syntax: int(foo) They may not translate to exactly the same instructions (do they?) but their effect should be the same (right?). If you're just casting between the built-in numeric types, I find C++-style cast syntax too verbose. As a former Java coder I tend to use C-style cast syntax instead, but my local C++ guru insists on using constructor syntax. What do you think?

    Read the article

  • After pip installing uWSGI there's no /etc/uwsgi/ directory - how can I use apps-enabled?

    - by orokusaki
    I've been using apt-get install uwsgi to install uWSGI. Today, I realized I needed a feature that's not available until uWSGI 1.1, and Ubuntu 12.04.1 doesn't have anything after 1.0.x, at least according to my apt-get install uwsgi=1.1 attempt. So, I used: pip install http://projects.unbit.it/downloads/uwsgi-lts.tar.gz After doing so, I get a message prescribing the use of /usr/local/bin/uwsgi to launch the program. I'm not a guru when it comes to compiling from source, but my understanding is that when you do so, nothing will be changed in the /etc/ directory. Is this correct? If not, why don't I have a /etc/uwsgi/ directory and, more specifically, a /etc/uwsgi/apps-enabled/ directory? Should I simply create the directories when installing uWSGI from source? I was hesitant to do so, considering there is no mention of this in the docs (I don't want something that accidentally works, etc.).

    Read the article

  • oralce + java encoding problem while insert

    - by Ahmad
    hi, I am kind of stuck on this one. im not a java or oracle guru, so please give detailed answers :) i've a web-service that inserts something into DB. the web-service is hosted on axis. the db is oracle with following properties: NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CHARACTERSET ZHS16GBK the web-service is hosted on windows server 2008, english version but i have changed the locale of the system to chinese now the data after insert has encoding problem and shows strange characters like ????,exxk?? the jws file has GBK encoding. and the data that is inserted into the DB is hard-coded in the file [we are not reading it from REQUEST]

    Read the article

  • Build Interactive Floor With Projection !?

    - by Synxmax
    Dear Guys I am somehow newbie and sometimes guru , but at this moment i don't have enough time to research My nightmare is , my boss ask me to create an interactive floor ( he just saw in an exhibition ) , he ask me to create one of them instead of buying , i am an actionscript crawler and developer with some skills in java and c# programming , i just made some track motion with a simple web cam , and this idea came to my mind if i can use an infrared or thermographic camera instead of simple camera so i can get better positioning if camera place at top of floor ! Now i just came here to ask you guys is there any resource , tip , help i can know before getting into this deal !? is there any lib or api out to deal with this ?! EVEN, if there is any resource , article from another language c++ , c , .... could help i just didn't have enough time to test lot of ways If you search interactive floors , or interactive floor projection you can find some companies who provide such a thing Thanks in advance ( and sorry for my damn poor english , français could be better :D )

    Read the article

  • Watir changes highline's "ask" method

    - by grundic
    Hello! I've encoutered some strange functionality, when using Watir and Highline together. Here is simple example: require 'highline/import' comp = ask("Company? ") { |q| q.default = "MySuperCompany" } puts comp require 'watir' comp = ask("Company? ") { |q| q.default = "MySuperCompany" } puts comp Here is an output: Company? |MySuperCompany| MySuperCompany [Company? ] => Company? Maybe it's a bug? I've also found in documentation for highline, that If @question is set before ask() is called, parameters are ignored and that object (must be a HighLine::Question) is used to drive the process instead. Sorry, I'm not a ruby guru :-(

    Read the article

  • SQL help - find the table that has 'somefieldId' as the primary key?

    - by Kettenbach
    Hello All, How can I search my sql database for a table that contains a field 'tiEntityId'. This field is referenced in a stored procedure, but I am unable to identify which table this id is a primary key for? Any suggestions? I currently look through stored procedure definitions for references to text by using something like this Declare @Search varchar(255) SET @Search='[10.10.100.50]' SELECT DISTINCT o.name AS Object_Name,o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id=o.object_id WHERE m.definition Like '%'+@Search+'%' ORDER BY 2,1 Any SQL guru's out there know what I need to use to find the table that contains the field, 'preferably the table where that field is the Primary Key. Thanks so much for any tips. Cheers, ~ck in San Diego

    Read the article

  • Powershell Replace Regex

    - by Brad
    I have a select-string which is seaching an IIS log for a particular string and returning the 2 lines above and one line below. So results look like this: 2012-06-15 18:26:09 98.138.206.39 OutboundConnectionResponse SMTPSVC1 WEB10 - 25 - - 220+mta1083.sbc.mail.ne1.yahoo.com+ESMTP+YSmtp+service+ready 0 0 60 0 218 SMTP - - - - 2012-06-15 18:26:09 98.138.206.39 OutboundConnectionCommand SMTPSVC1 WEB10 - 25 EHLO - WEB10.DOMAINCOM 0 0 4 0 218 SMTP - - - - 2012-06-15 18:26:09 74.125.244.10 OutboundConnectionResponse SMTPSVC1 WEB10 - 25 - - 550+IP+Authorization+check+failed+-+psmtp 0 0 41 0 218 SMTP - - - - 2012-06-15 18:26:09 74.125.244.10 OutboundConnectionCommand SMTPSVC1 WEB10 - 25 RSET - - 0 0 4 0 218 SMTP - - - - Note the third line begins with denoting thats the line that select-string matched upon. I am trying to do a -replace on the to replace it with < font color="red"$1< /font but my replace doesn't seem to work. Here's my code: $results = $results -replace "(^ )(.*)$", "< font color='red'$1< font" Can any powershell regex guru's out there tell me why my regular expression isn't matching? Thanks Brad

    Read the article

  • Is it secure to use malloc?

    - by Felix Guerrero
    Somebody told me that allocating with malloc is not secure anymore, I'm not a C/C++ guru but I've made some stuff with malloc and C/C++. Does anyone know about what risks I'm into? Quoting him: [..] But indeed the weak point of C/C++ it is the security, and the Achilles' heel is indeed malloc and the abuse of pointers. C/C++ it is a well known insecure language. [..] There would be few apps in what I would not recommend to continue programming with C++."

    Read the article

  • Any active Bold for Delphi users ?

    - by Roland Bengtsson
    What are you using as a persistance framework when programming in Delphi? If the application is growing it soon became really complicated to handle the model in SQL ? Bold is a persistance framework for Delphi win32 that really deserve more attention. I use it daily and using OCL instead of SQL to get data from the database saves a lot of time and debugging. When the model is changed Bold translate this to an SQL script and change the database. EDIT: For those that are interested in Bold for Delphi I have spend this evening on create a site on Google about it. I'm not a guru in html so the design is maybe not so exciting. But I want comments and reactions about the site. You can leave the comments in this thread or at the bottom on the subpage. And the address is... http://sites.google.com/site/boldfordelphi/

    Read the article

  • FlashBuilder4 RIA on GAE

    - by user330195
    I've read/watched most of your blog/tuts and it seems you are the "beautiful front-ends for Java based back-ends" guru ;) That (sucking up ;) said, I want to build a highly scalable "facebook for business" and after much testing am pretty set on FlashBuilder4 (Flex) with Google App Engine (GAE). What are your thoughts on the need/advisability of also using Spring/Cairngorm/etc frameworks? Frankly I don't have extensive experience coding, however feel the "MVC utopia" universally aspired to becomes convoluting when duplicating between front and back ends as envisioned above (i.e. Flex/ActionScript and GAE/Java respectively).

    Read the article

  • Need help with REGEXP_REPLACE

    - by Randy
    hey regex guru's I have a data column that contains a substring similar to this: 'This is a string with ID=123 contained inside' i need to replace the ID=123 with another fixed string say ID=1 i have a working REPLACE call that swaps out the values correctly, but this only works on a known original id number. I can extend to make it work when the number of digits are known by using some substr magic, however, the id number may have an arbitrary number of digits, so i'm thinking regex. any help with the regex magix to grab the entire ID=999 substring no matter how many digits would be very helpful. thanks

    Read the article

  • Very long tree control inside a <frame>

    - by ryancerium
    I have an tree control inside of a frame. It's quite tall, around 2000 pixels. Right now, we use the frame's scroll bars, which is mostly good. Unfortunately, when you select an item near the bottom of the list, the page reloads and the view goes back to the top of the list. I tried calling the tree control's ScrollNodeIntoView() function, but since we're not using the tree's scroll bars, it just thinks that it's displaying the full 2000 pixels and the control doesn't have its own scroll bar. I'm not much of an HTML guru, so I have two ideas, neither of which I know how to do. 1) Tell the frame to not to let the tree render all 2000 pixels and instead stay inside the viewable area. 2) Tell the tree to not render all 2000 pixels and instead stay within the viewable area. Setting the CSS height property on the within the frame doesn't do anything. Thanks.

    Read the article

  • SVG Animation in Python? - Any options other than Things! 0.4?

    - by ThantiK
    I recently gave my daughter some time on the computer, and she really likes a program called 'BabySmash!', and I also have another program that came with a keyboard attachment called 'Laugh, Smile & Learn' from playschool I think. I'm not a python guru by any stretch of the imagination and I kind of have it in my head that I want to create some sort of program in the spirit of these two, with vector animation and sounds. Thing is, it doesn't look like there are many options for vector animation in python. I found a library called Things! 0.4, but it's lacking in-depth documentation and seems to be more of an experiment in vector animation rather than a full blown solution. Are there any options that I'm not immediately finding? What other animation-libraries do you recommend? Even if the library isn't vector-based, ease of use is probably the strongest factor in my use.

    Read the article

  • Aren't passwords written in inputbox vulnerable through a stack trace ?

    - by loursonwinny
    Hello, I am not a guru of the stack tracing, at all. I even don't know how to get some. Anyway, I am wondering if entering a password entered in an inputbox is safe. Can't it be retrieved by getting a stack trace ? A password entered that way will be found in many places : Caption property of the TEdit Result of the function which creates the inputbox probably, a variable that stores the Result of the InputBox Command etc... If the answer is "yes, it is a vulnerability", then my world collapses :p. What can be done to avoid that vulnerability hole ? NOTE : The InputBox is an example but it can be with a "homebrewed" login prompt. InputBox is a Delphi command but I haven't tagged the question with the Delphi tag because I suppose that the question concerns any language. Thanks for reading

    Read the article

  • Use HTML markup into web.config file

    - by stighy
    Hi, i've to display a messagge in my homepage (default.aspx) different for each "installation" of my web app. i would like to avoid to make a call to database to show this message.. so i've thougth to use web.config to store something like this <add key="WelcomeString" value="lorem ipsus <b>doloret sit amen</b>" /> But i've noticed i can't use html markup into web.config ... Is there a better approach ? Or is there a way to insert html markup into web.config ? Thank you again stack overflow guru's... i'm learning from you a lot of things !

    Read the article

  • R: how to make a unique set of names from a vector of strings?

    - by Mike Dewar
    Hi, I have a vector of strings. Check out my vector, it's awesome: > awesome [1] "a" "b" "c" "d" "d" "e" "f" "f" I'd like to make a new vector that is the same length as awesome but where, if necessary, the strings have been uniqueified. For example, a valid output of my desired function would be > awesome.uniqueified [1] "a" "b" "c" "d.1" "d.2" "e" "f.1" "f.2" Is there an easy, R-thonic and beautiful way to do this? I should say my list in real life (it's not called awesome) contains 25000ish mircoarray probeset identifiers. I'm always nervous when I embark on writing little generic functions (which I'm sure I could do) as I'm sure some R guru has come across this problem in the past, nailed it with some incredible algorithm that doesn't even have to store more than half an element in the vector. I'm just not sure what they might have called it. Probably not uniqueify.

    Read the article

  • Seeking free ODBC database optimization tool for non-experts

    - by mawg
    I'm a database n00b and am reading as many books as I can. I have been given responsibility for an ODBC tool where the databases were designed by a hardware engineer with some VB experience - which made him a s/w guru in the small firm at that time. Things are running slowly and I suspect that the db could have been designed better. I hope to learn enough to use Explain/Describe, etc maybe add some indices, but, in the meantime, is there any free for commercial use tool which can examine an ODBC database and suggest improvements. I'm just talking about db schema here, but maybe I should also be looking at optimizing Selects with Joins? Is there a tool for that? ODBC compliant.

    Read the article

  • c# Delegates, Events and Lambda Expr for new students

    - by MarkP
    I've been asked by my pointy haired boss to educate our new co-ops (interns) in the ways of C#. I have roughly ~30mins to cover the topics of Delegates, Events and Lambda Expressions. The time restriction is rather tight and the topics are broad. Since I'm not a C# guru, I would like some hints and pointers. Since my time is short, what points should I cover with respect to the three topics listed above? What are some good Do's and Dont's when using those three things? I might have time for a short Lambda Expr demo. What is the most common use of LExpr (probably a Select().Where() statement on an enumerable??) that I could demo? Thanks. EDIT: The students have working knowledge of C++ and Java.

    Read the article

  • Added a tableview in a viewcontroller. How do I load tableview cells

    - by user1509593
    I have a view controller In storyboard, added tableview to view controller. Created an IBOutlet for tableview to View controller's header file. The view controller's header file includes an resultsarray Changed the @interface to include delegates <\UITableViewDelegate, UITableViewDataSource View controller implementation file has mandatory tableview protocols (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath The view controller has search button in storyboard and IBAction in view controller header file. On click of search button, results are obtained. How do I load the array and redisplay tableview with results in search method. After I loaded the results in array, I tried [self viewdidload];, hoping the cells will be loaded. But didn't. I thought of calling [self.detailView cellForRowAtIndexPath:?indexpath], but dontknow what the value of index path is. Appreciate help from guru's to load the UItableviewcell Thanks

    Read the article

  • what are most important things that i must know in order to jump into silverlight development

    - by Poni
    I have vast programming knowledge; C++/C#/ActionScript/ASM/PHP..... so learning the language of SilverLight itself isn't of an issue. To keep long story short, when asking this question I'm asking it as a developer who's coming from Flash world - great graphics/sounds/media support, fully cross-platform, ability to combine several SWFs within a "movie" (which also implies code reusability). A Flash developer have pretty much freedom. What are most important things that i must know in order to jump into silverlight development? Did you already make the move to SilverLight from Flash yourself? Are you a "guru" at both? Great, let's hear what you have to say - developer to developer! =)

    Read the article

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