Search Results

Search found 133 results on 6 pages for 'asd'.

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

  • How can I construct this file tree based on what files the user is allowed to view?

    - by robert
    I have an array of files that looks like this: Array ( [0] => Array ( [type] => folder [path] => RootFolder ) [1] => Array ( [type] => file [path] => RootFolder\error.log ) [2] => Array ( [type] => folder [path] => RootFolder\test ) [3] => Array ( [type] => file [path] => RootFolder\test\asd.txt ) [4] => Array ( [type] => folder [path] => RootFolder\test\sd ) [5] => Array ( [type] => file [path] => RootFolder\test\sd\testing.txt ) ) I parse this array and create a tree like view based on the depth of the files ('/' count). It looks like this: RootFolder - error.log - test - asd.txt - sd - testing.txt What I have now is an array of filepaths the user is allowed to view. I need to take this array into account when constructing the above tree. That array looks like this: Array ( [0] => Array ( [filePath] => RootFolder\test\sd ) [1] => Array ( [filePath] => RootFolder\error.log ) ) It would be easy to do a if in_array($path, $allowed) but that won't give me the tree. Just a list of files... Another part I'm stumped on is this requirement: If the user has access to view the folder test, they then have access to all children of that folder. My idea was to simply parse the filepaths. For example, I'd confirm that RootFolder\test\sd was a directory and then create a tree based on the '/' count. Like I was doing earlier. Then, since this is a directory, I'd pull out all files within this directory and show them to the user. However, I'm having trouble converting this to working code... Any ideas?

    Read the article

  • passing Func<TSource, TKey> keySelector error

    - by user338429
    static void Main() { string[] a = { "a", "asd", "bdfsd", "we" }; a = a.OrderBy(fun).ToArray(); } private static int fun(string s) { return s.Length; } its is giving compile time error . I know that we can do this with Lambda expression like this. a.OrderBy(s=>s.Length).ToArray(); but i want to this do by defining different function . What mistake i have done?

    Read the article

  • Rails3 nomethod error #<ActiveRecord::Relation>

    - by Dodi
    Hi! I'm writing a static page controller. I get the menuname in the routes.rb and it's call the static controller show method. match '/:menuname' = 'static#show' And static_controller.rb: @static=Staticpage.where("menuname = ?", params[:menuname]) But if I want print @static.title in the view, I get this error: undefined method `title' for # Whats wrong? the SQL query looks good: SELECT staticpages.* FROM staticpages WHERE (menuname = 'asd')

    Read the article

  • Error while zipping files with unicode characters in names with Win7's "send to > compressed (zipped) folder"

    - by user1306322
    When I try to zip files containing unicode characters in their names, such as © or ™, I get the following error: [Window Title] Compressed (zipped) Folders Error [Content] 'C:\Asd™.txt' cannot be compressed because it includes characters that cannot be used in a compressed folder, such as ™. You should rename this file or directory. [OK] This only became a problem when I reinstalled Windows 7. I probably had some resources necessary from this error to be resolved automatically, but it's almost clean installation now and I can't zip files. How do I fix this? UPD: Some time passed since I posted this question, I installed some of my usual applications, but the problem still exists and I'm not sure if it can be fixed by installing some specific application from before.

    Read the article

  • Keyboard Typing Problem

    - by Wietse G
    Hello all, When i got home from work yesterday i couldn't logg in on my account on my desktop pc (Acer Aspire M5620). The reason for this was that when i was typing, more diggets would appear than i pressed. After logging on an account that required no password (my Dad's) i found out that some of my key bindings were messed up. For instance when typing: W --- qwe would appear q --- qw + right mouse e --- we a --- as s --- asd d --- sd z --- zx x --- zxc c --- xc Moreover pressing: 1 --- 12 2 --- 123 3 --- 23 I am typing this from my Dad's laptop (which is working like a charm). I was wondering if anyone has seen this problem before and thus knows a way to fix it. I'm not the brainy type when it comes to computers. Ps: I apologise for any mistakes in my English, for it is not my native tongue. I'm from the Netherlands

    Read the article

  • CodePlex Daily Summary for Thursday, November 01, 2012

    CodePlex Daily Summary for Thursday, November 01, 2012Popular ReleasesAccess 2010 Application Platform - Build Your Own Database: Application Platform - 0.0.1: Initial Release This is the first version of the database. At the moment is all contained in one file to make development easier, but the obvious idea would be to split it into Front and Back End for a production version of the tool. The features it contains at the moment are the "Core" features.Python Tools for Visual Studio: Python Tools for Visual Studio 1.5: We’re pleased to announce the release of Python Tools for Visual Studio 1.5 RTM. Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python language. PTVS supports a broad range of features including CPython/IronPython, Edit/Intellisense/Debug/Profile, Cloud, HPC, IPython, etc. support. For a quick overview of the general IDE experience, please watch this video There are a number of exciting improvement in this release comp...Devpad: 4.25: Whats new for Devpad 4.25: New Theme support New Export Wordpress Minor Bug Fix's, improvements and speed upsAssaultCube Reloaded: 2.5.5: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to package for those OSes. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Changelog: Fixed potential bot bugs: Map change, OpenAL...Edi: Edi 1.0 with DarkExpression: Added DarkExpression theme (dialogs and message boxes are not completely themed, yet)MCEBuddy 2.x: MCEBuddy 2.3.6: Changelog for 2.3.6 (32bit and 64bit) 1. Fixed a bug in multichannel audio conversion failure. AAC does not support 6 channel audio, MCEBuddy now checks for it and force the output to 2 channel if AAC codec is specified 2. Fixed a bug in Original Broadcast Date and Time. Original Broadcast Date and Time is reported in UTC timezone in WTV metadata. TVDB and MovieDB dates are reported in network timezone. It is assumed the video is recorded and converted on the same machine, i.e. local timezone...MVVM Light Toolkit: MVVM Light Toolkit V4.1 for Visual Studio 2012: This version only supports Visual Studio 2012 (and all Express editions too). If you use Visual Studio 2010, please stay tuned, we will publish an update in a few days with support for VS10. V4.1 supports: Windows Phone 8 Windows 8 (Windows RT) Silverlight 5 Silverlight 4 WPF 4.5 WPF 4 WPF 3.5 And the following development environments: Visual Studio 2012 (Pro, Premium, Ultimate) Visual Studio 2012 Express for Windows 8 Visual Studio 2012 Express for Windows Phone 8 Visual...Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.73: Fix issue in Discussion #401101 (unreferenced var in a for-in statement was getting removed). add the grouping operator to the parsed output so that unminified parsed code is closer to the original. Will still strip unneeded parens later, if minifying. more cleaning of references as they are minified out of the code.Liberty: v3.4.0.1 Release 28th October 2012: Change Log -Fixed -H4 Fixed the save verification screen showing incorrect mission and difficulty information for some saves -H4 Hopefully fixed the issue where progress did not save between missions and saves would not revert correctly -H3 Fixed crashes that occurred when trying to load player information -Proper exception dialogs will now show in place of crashesPlayer Framework by Microsoft: Player Framework for Windows 8 (Preview 7): This release is compatible with the version of the Smooth Streaming SDK released today (10/26). Release 1 of the player framework is expected to be available next week. IMPROVEMENTS & FIXESIMPORTANT: List of breaking changes from preview 6 Support for the latest smooth streaming SDK. Xaml only: Support for moving any of the UI elements outside the MediaPlayer (e.g. into the appbar). Note: Equivelent changes to the JS version due in coming week. Support for localizing all text used in t...Send multiple SMS via Way2SMS C#: SMS 1.1: Added support for 160by2Quick Launch: Quick Launch 1.0: A Lightweight and Fast Way to Manage and Launch Thousands of Tools and ApplicationsPress Win+Q and start to search and run. http://www.codeplex.com/Download?ProjectName=quicklaunch&DownloadId=523536Orchard Project: Orchard 1.6: Please read our release notes for Orchard 1.6: http://docs.orchardproject.net/Documentation/Orchard-1-6-Release-Notes Please do not post questions as reviews. Questions should be posted in the Discussions tab, where they will usually get promptly responded to. If you post a question as a review, you will pollute the rating, and you won't get an answer.Media Companion: Media Companion 3.507b: Once again, it has been some time since our release, and there have been a number changes since then. It is hoped that these changes will address some of the issues users have been experiencing, and of course, work continues! New Features: Added support for adding Home Movies. Option to sort Movies by votes. Added 'selectedBrowser' preference used when opening links in an external browser. Added option to fallback to getting runtime from the movie file if not available on IMDB. Added new Big...MSBuild Extension Pack: October 2012: Release Blog Post The MSBuild Extension Pack October 2012 release provides a collection of over 475 MSBuild tasks. A high level summary of what the tasks currently cover includes the following: System Items: Active Directory, Certificates, COM+, Console, Date and Time, Drives, Environment Variables, Event Logs, Files and Folders, FTP, GAC, Network, Performance Counters, Registry, Services, Sound Code: Assemblies, AsyncExec, CAB Files, Code Signing, DynamicExecute, File Detokenisation, GUI...NAudio: NAudio 1.6: Release notes at http://mark-dot-net.blogspot.co.uk/2012/10/naudio-16-release-notes-10th.htmlPowerShell Community Extensions: 2.1 Production: PowerShell Community Extensions 2.1 Release NotesOct 25, 2012 This version of PSCX supports both Windows PowerShell 2.0 and 3.0. See the ReleaseNotes.txt download above for more information.Umbraco CMS: Umbraco 4.9.1: Umbraco 4.9.1 is a bugfix release to fix major issues in 4.9.0 BugfixesThe full list of fixes can be found in the issue tracker's filtered results. A summary: Split buttons work again, you can now also scroll easier when the list is too long for the screen Media and Content pickers have information of the full path of the picked item Fixed: Publish status may not be accurate on nodes with large doctypes Fixed: 2 media folders and recycle bins after upgrade to 4.9 The template/code ...AcDown????? - AcDown Downloader Framework: AcDown????? v4.2.2: ??●AcDown??????????、??、??、???????。????,????,?????????????????????????。???????????Acfun、????(Bilibili)、??、??、YouTube、??、???、??????、SF????、????????????。 ●??????AcPlay?????,??????、????????????????。 ● AcDown??????????????????,????????????????????????????。 ● AcDown???????C#??,????.NET Framework 2.0??。?????"Acfun?????"。 ????32??64? Windows XP/Vista/7/8 ???? 32??64? ???Linux ????(1)????????Windows XP???,????????.NET Framework 2.0???(x86),?????"?????????"??? (2)???????????Linux???,????????Mono?? ??2...Rawr: Rawr 5.0.2: This is the Downloadable WPF version of Rawr!For web-based version see http://elitistjerks.com/rawr.php You can find the version notes at: http://rawr.codeplex.com/wikipage?title=VersionNotes Rawr Addon (NOT UPDATED YET FOR MOP)We now have a Rawr Official Addon for in-game exporting and importing of character data hosted on Curse. The Addon does not perform calculations like Rawr, it simply shows your exported Rawr data in wow tooltips and lets you export your character to Rawr (including ba...New ProjectsAsbesto: Proyecto grupo: "2ravas" para Laboratorio de Computación IV de la carrera TSP de la UTN-FRGP Realizado en C# y ASP.NET en Visual Studio 2012 y SQL Server 2012C++ Diamond printer on console without if statement: prints just a diamond with stars(*). only one important and funny feature is that it's not using 'if' statement. C++ used.CloudTest: Test cloud computing projectEnumeration of objects Class Library C#: At core level in Java I like extension of traditional enum type permiting use as the elements instances of a class. The project implements the same idea by C# with some more advanced features like a set type with boolean operators extending idea of FlagsAttributeEquation Inversion: Visual Studion 2008 Add-in for equation inversions.ESENT Serialization Class Library: ESENT Serialization class library is built above Managed ESENT. It allows you to store your objects in the underlying extensible storage engine database.ForceHttps: Very simple httpModule to ensure that all http requests are https. 1. Drop the dll into your website's bin directory 2. Update httpModules section of your web.config to reference the dll 3. Make sure your Web Server can handle SSL requests for the URL ALL http requests will be redirected as https.forrajeriaPAV2: tp pav2 asd as asd as fasfjaijiasjifoa as asf asf as afs fas asf afs fsaGoogle Analytics for WinRT: A Windows Store (WinRT) class library for tracking Google Analytics page views, events, and custom variables for your Metro style desktop and tablet apps.huanglitest10312: mvc projectiMan: iMan will be your own port manager, which help to provide the information about all the ports open in your PC It's completely developed in .NET C#InjectionCop: Facilitates secure coding through static code analysis and contract annotations in the Common Language Infrastructure.Master of Olympus: Remake of Master of Olympus : Zeus, a game developed by Impressions Games in 2000.MediaScribe: MediaScribe is a note app for your media.MouseNestDotNet: A small personal website application.Project Estimator ???????? ?? ?????????????? ?? ???????: Project Estimator ? ???????? ??????????? ? ??????????? ?? ????? ? ???????? ????.Projekt grupowy 1: Project created only for school purpose.SecondHandApp: Warenwirtschaftsprogramm für denn SecondHand LädenSimple .NET XML Serialization: .NET's XML serialization using Linq XObject classes EG: XElement in an IXmlSerializable base classStrip Converter: A Very Handy Converter for 2D Games Developers Developer Website: http://www.bluebulk.infoSwitch JS Control (Client Side): Switch JS control is a very light client side library to create switch(es) on web applications or mobile applications.VisaSys: Visa System????????: TODO::????

    Read the article

  • utf8 codification problem C#, writing a tex file, and compiling with pdflatex

    - by voodoomsr
    Hi, i have the next code written in C#....it create a tex file using utf-8.....the problem is that appears that is not a real valid utf-8 file because, when i use pdflatex it doesn't recognize the characters with accents. Somebody knows a way to write a real UTF-8 file? When i use TexmakerX to create a utf8 file with the same latex code, pdflatex doesn't complaints, so the problem must be in the generation. FileInfo file = new FileInfo("hello.tex"); StreamWriter writer = new StreamWriter("hello.tex", false, Encoding.UTF8); writer.Write(@"\documentclass{article}" + "\n" + @"\usepackage[utf8]{inputenc}" + "\n" + @"\usepackage[spanish]{babel}" + "\n" + @"\usepackage{listings}" + "\n" + @"\usepackage{fancyvrb}" + "\n" + @"\begin{document}" + "\n" + @"\title{asd}" + "\n" + @"\maketitle" + "\n" + @"\section{canción}" + "\n" + @"canción" + "\n" + @"\end{document}"); writer.Close();

    Read the article

  • Ajax Tab control in master page

    - by Senthilkumar
    Hi All I am using ajax tab container in master page with more than 4 tab panels, but when i include asp:contentplaceholder in content template of each tab panel i am not able to see the second or the third page (aspx) when i click on the tab.. i searched through net but didn get any answers. Pl help me. only the first page (aspx) included in content place holder is getting loaded the sencond asd so pages in tab panel are not// .. my example code here (.. only tis loaded) (.. not this one even when i clicked it)

    Read the article

  • Linq2Sql relationships and WCF serialization problem

    - by devmania
    hi, here is my scenario i got Table1 id name Table2 id family fid with one to many relationship set between Table1. id and Table2.fid now here is my WCF service Code [OperationContract] public List<Table1> GetCustomers(string numberToFetch) { using (DataClassesDataContext context = new DataClassesDataContext()) { return context.Table1s.Take(int.Parse(numberToFetch)).ToList( ); } } and my ASPX page Code <body xmlns:sys="javascript:Sys" xmlns:dataview="javascript:Sys.UI.DataView"> <div id="CustomerView" class="sys-template" sys:attach="dataview" dataview:autofetch="true" dataview:dataprovider="Service2.svc" dataview:fetchParameters="{{ {numberToFetch: 2} }}" dataview:fetchoperation="GetCustomers"> <ul> <li>{{family}}</li> </ul> </div> though i set serialization mode to Unidirectional in Linq2Sql designer i am not able to get the family value and all what i get is this in firebug {"d":[{"__type":"Table1:#","id":1,"name":"asd"},{"__type":"Table1:#","id":2,"name":"wewe"}]} any help would be totally appreciated

    Read the article

  • How to return a dynamic value from a Mocha mock in Ruby

    - by Vivek
    The gist of my problem is as follows:- I'm writing a Mocha mock in Ruby for the method represented as "post_to_embassy" below. It is not really our concern, for the purpose of describing the problem, what the actual method does. But I need the mock to return a dynamic value. The proc '&prc' below is executing rightly in place of the actual method. But the "with" method in Mocha only allows for boolean values to be returned. So the code below outputs nil. I need it to output the value being passed through orderInfoXml. Does anyone know of an alternate method I can use? require 'rubygems' require 'mocha' include Mocha::API class EmbassyInterface def post_to_embassy(xml) puts "This is from the original class:-" puts xml return xml end end orderInfoXml = "I am THE XML" mock = EmbassyInterface.new prc = Proc.new do |orderXml| puts "This is from the mocked proc:-" puts orderXml orderXml end mock.stubs(:post_to_embassy).with(&prc) mock_result = mock.post_to_embassy(orderInfoXml) p mock_result #p prc.call("asd") output:- This is from the mocked proc:- I am THE XML nil

    Read the article

  • Globalize2 and migrations

    - by diegogs
    Hi, I have used globalize2 to add i18n to an old site. There is already a lot of content in spanish, however it isn't stored in globalize2 tables. Is there a way to convert this content to globalize2 with a migration in rails? The problem is I can't access the stored content: >> Panel.first => #<Panel id: 1, name: "RT", description: "asd", proje.... >> Panel.first.name => nil >> I18n.locale = nil => nil >> Panel.first.name => nil Any ideas?

    Read the article

  • Strange Scala error.

    - by Lukasz Lew
    I tried to create abstract turn based Game and abstract AI: abstract class AGame { type Player type Move // Player inside def actPlayer : Player def moves (player : Player) : Iterator[Move] def play (move : Move) def undo () def isFinished : Boolean def result (player : Player) : Double } abstract class Ai[Game <: AGame] { def genMove (player : Game#Player) : Game#Move } class DummyGame extends AGame { type Player = Unit type Move = Unit def moves (player : Player) = new Iterator[Move] { def hasNext = false def next = throw new Exception ("asd") } def actPlayer = () def play (move : Move) { } def undo () { } def isFinished = true def result (player : Player) = 0 } class DummyAi[Game <: AGame] (game : Game) extends Ai[Game] { override def genMove (player : Game#Player) : Game#Move = { game.moves (player).next } } I thought that I have to use this strange type accessors like Game#Player. I get very puzzling error. I would like to understand it: [error] /home/lew/Devel/CGSearch/src/main/scala/Main.scala:41: type mismatch; [error] found : Game#Player [error] required: DummyAi.this.game.Player [error] game.moves (player).next [error] ^

    Read the article

  • assigning variables to DOM event listeners when iterating

    - by ptrn
    I'm thinking there's something basic stuff I'm missing here; for (var i=1; i<=5; i++) { var o = $('#asd'+i); o.mouseover(function() { console.info(i); }); } When hovering over the five different elements, I always get out the last value from iteration; the value 5. What I want is different values depending of which element I'm hovering, all from 1 to 5. What am I doing wrong here?

    Read the article

  • complicated sql query !!

    - by user507779
    LookupTable: userid, mobileid, startedate, enddate , owner 1 , 1 , 12-12-2000, 01-01-2001, asd 2 , 2 , 12-12-2000, 01-01-2001, dgs 3 , 3 , 02-01-2001, 01-01-2002, sdg 4 , 4 , 12-12-2000, 01-01-2001, sdg UserInfoTable: userid, firstname, lastname, address 1 , tom , do , test 2 , sam , smith , asds 3 , john , saw , asdasda 4 , peter , winston , near by Mobile: Mobileid, Name , number, imeinumber 1 , apple , 123 , 1111111 2 , nokia , 456 , 2222222 3 , vodafone , 789 , 3333333 CallLogs: id , Mobileid, callednumbers (string), date , totalduration 1 , 1 , 123,123,321 , 13-12-2000 , 30 2 , 1 , 123,123,321 , 14-12-2000 , 30 3 , 2 , 123,123,321 , 13-12-2000 , 30 4 , 2 , 123,123,321 , 14-12-2000 , 30 5 , 3 , 123,123,321 , 13-12-2000 , 30 6 , 3 , 123,123,321 , 14-12-2000 , 30 1 , 1 , 123,123,321 , 13-01-2002 , 30 2 , 1 , 123,123,321 , 14-01-2002 , 30 I want a query which will return me the following: firstname, lastname, mobile.name as mobilename, callednumbers (as concatinated strings from different rows in CallLogs table) and need it for year 2000 example: firstname, lastname, mobilename, callednumbers tom , do , apple , 123,123,321, 123,123,321 sam , smith , nokia , 123,123,321, 123,123,321 peter , winston , apple , 123,123,321, 123,123,321 any help will be highly appreciated...

    Read the article

  • Hot to get custom http-header in asp.net?

    - by Sirius Lampochkin
    I have an asp.net appliction on the one server. There I've added code on server-side in Page_Load: Response.AddHeader("key", "password-key-from-hotel"); On the client side I have a form: $lt;form ... action="www.link-to-another-domaint" >   <input type="hidden" id="asd" value="fgh" > .... </form> <script type="text/javascript">   document.forms[0].submit(); </script> Then on the other domain - there is also my other application - I'm trying to get the hedaer "key" by this code: Request.Headers["key"].ToString(); But there is no such header. Is there is a desicion? Where is my mistake?

    Read the article

  • Using the value of a variable as another variables name in Ruby

    - by hrickards
    Hi, I'm just starting out in learning Ruby and I've written a program that generates some numbers and assigns them to variables @one, @two, @three etc. The user can then specify a variable to change by inputting it's name (e.g one). I then need to do something like '@[valueofinout] = asd'. How would I do this, and is there a better way as the way I'm thinking of seems to be discouraged? I've found x = "myvar" myvar = "hi" eval(x) -> "hi" but I don't completely understand why the second line is needed. In my case would I use something like @one = "21" input = "one" input = "@" + input changeto = "22" eval(input) -> changeto Thanks

    Read the article

  • what is the problem with my javascript code, it is not working.

    - by Shantanu Gupta
    I am trying to call my function named isUrgencyTypeValid from my javascript code but it is not working. Please check what is the problem in my code. My javascript function is not being called. HTML Code <td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr> jQuery Call function $("#btnSubmit").bind("click",function(){ isUrgencyTypeValid(); }); javascript implemented function function isUrgencyTypeValid() { alert("asd"); var i=0; for(i=0;i<$("radio[name='urgencyType']").length;i++) { if($("radio[name='urgencyType']")[i].checked) { alert($("radio[name='urgencyType']")[i].value); return true; } return false; }

    Read the article

  • How to store local variables in jQuery click functions?

    - by Geuis
    I'm trying to figure out how to store external variable values in the functions created during jQuery's click() event. Here's a sample of the code I'm working with now. for(var i=0; i<3; i++){ $('#tmpid'+i).click(function(){ var gid = i; alert(gid); }); } <div id="tmpid0">1al</div> <div id="tmpid1">asd</div> <div id="tmpid2">qwe</div> So what's happening is that the events are attaching properly, but the value of 'gid' is always the last incremented value of 'i'. I'm not sure how to setup the private variable in this situation.

    Read the article

  • Adding List Array item In A Data Table Using Loop Results Error .. .

    - by Syed Raza
    I am trying to put the list array(res) item in to the Data Table(_Hdt) using for Loop I have put the values in "res" list erray using loop...but this loop results in an error: "variable use asd a method ?" Here _Hdt and dt are data table and res is list array, for (int r = 0; r < _Hdt.Rows.Count; r++) { foreach (DataRow row in dt.Select("DATE='" + _Hdt.Rows[r]["DATE"].ToString().Trim() + "'")) { DateTime date = Convert.ToDateTime(_Hdt.Rows[r]["DATE"].ToString().Trim()); string dateformat = String.Format("{0:dddd MMM d}", date); _Hdt.Rows[r]["DATE"] = dateformat; _Hdt.Rows[r]["MTU"] = row["MTU"].ToString().Trim(); _Hdt.Rows[r]["POWER"] = (Convert.ToDecimal(row["POWER"].ToString().Trim()) / 1000).ToString(); _Hdt.Rows[r]["COST"] = row["COST"].ToString().Trim(); _Hdt.Rows[r]["VOLTAGE"] = row["VOLTAGE"].ToString().Trim(); _Hdt.Rows[r]["KW"] = res(r); } }

    Read the article

  • generic function for extracting values from an array with one particular key in PHP

    - by Sabya
    Is it possible in PHP to extract values from an array with a particular key path and return an array of those values? I'll explain with an example: $user = array ( array( id => 1, email =>'[email protected]', project => array ('project_id' => 222, 'project_name' => 'design') ), array( id => 2, email =>'[email protected]', project => array ('project_id' => 333, 'project_name' => 'design') ) ); /** I have to write a function something like: */ $projectIds = extractValuesWithKey($user, array('project', 'project_id')); print_r($projectIds); Output: Array( [0] => 222, [1] => 333 )

    Read the article

  • [LINQ noob] Please help me convert this Python 3.x snippet to .net LINQ.

    - by Hamish Grubijan
    I want to sort elements of a HashSet<string> and join them by a ; character. Python interpreter version: >>> st = {'jhg', 'uywer', 'nbcm', 'utr'} >>> strng = ';'.join(sorted(s)) >>> strng 'ASD;anmbh;ashgg;jhghjg' C# signature of a method I seek: private string getVersionsSorted(HashSet<string> versions); I can do this without using Linq, but I really want to learn it better. Many thanks!

    Read the article

  • Can't inherit from auto_ptr without problems

    - by fret
    What I want to do is this: #include <memory> class autostr : public std::auto_ptr<char> { public: autostr(char *a) : std::auto_ptr<char>(a) {} autostr(autostr &a) : std::auto_ptr<char>(a) {} // define a bunch of string utils here... }; autostr test(char a) { return autostr(new char(a)); } void main(int args, char **arg) { autostr asd = test('b'); return 0; } (I actually have a copy of the auto_ptr class that handles arrays as well, but the same error applies to the stl one) The compile error using GCC 4.3.0 is: main.cpp:152: error: no matching function for call to `autostr::autostr(autostr)' main.cpp:147: note: candidates are: autostr::autostr(autostr&) main.cpp:146: note: autostr::autostr(char*) I don't understand why it's not matching the autostr argument as a valid parameter to autostr(autostr&).

    Read the article

  • Can't inherit from auto_str without problems

    - by fret
    What I want to do is this: #include <memory> class autostr : public std::auto_ptr<char> { public: autostr(char *a) : std::auto_ptr<char>(a) {} autostr(autostr &a) : std::auto_ptr<char>(a) {} // define a bunch of string utils here... }; autostr test(char a) { return autostr(new char(a)); } void main(int args, char **arg) { autostr asd = test('b'); return 0; } (I actually have a copy of the auto_ptr class that handles arrays as well, but the same error applies to the stl one) The compile error using GCC 4.3.0 is: main.cpp:152: error: no matching function for call to `autostr::autostr(autostr)' main.cpp:147: note: candidates are: autostr::autostr(autostr&) main.cpp:146: note: autostr::autostr(char*) I don't understand why it's not matching the autostr argument as a valid parameter to autostr(autostr&).

    Read the article

  • acts-as-taggable-on: find tags with name LIKE, sort by tag_counts?

    - by James
    Hi I'm using the rails plugin acts-as-taggable-onand I'm trying to find the top 5 most used tags whose names match and partially match a given query. When I do User.skill_counts.order('count DESC').limit(5).where('name LIKE ?', params[:query]) This return the following error: ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: name: SELECT tags.*, COUNT(*) AS count FROM "tags" INNER JOIN users ON users.id = taggings.taggable_id LEFT OUTER JOIN taggings ON tags.id = taggings.tag_id AND taggings.context = 'skills' WHERE (taggings.taggable_type = 'User') AND (taggings.taggable_id IN(SELECT users.id FROM "users")) AND (name LIKE 'asd') GROUP BY tags.id, tags.name HAVING COUNT(*) > 0 ORDER BY count DESC LIMIT 5 But when I do User.skill_counts.first.name this returns "alliteration" I'd appreciate any help on this matter.

    Read the article

  • URL Rewrite problem. (Many directory)

    - by marharépa
    Hello! I'd like to make a htaccess file, which can make a good structure for my websites. My .htaccess is now: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_URI} !^/admin/* RewriteRule ^(.*)$ index.php?q=$1 [QSA] (based on Sombat's comment) And I want to make this, with it: for every elements but (jpg|jpeg|gif|png|css|js|pl|txt) if domain.xx/admin redirect to the domain.xx/admin directory and don't make a rewrite at all i mean: let me use domain.xx/admin/index.php?asd=1&asdd=2 else rewrite everything as rule one, to index.php. Thanks for the help.

    Read the article

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