Posts

reporting services - SSRS Creating Treeview -

so i'm having problems when trying make treeview group. have folder structure in database gives me path each node should have. problem recursive parent seems @ immediate parent child relationship opposed full structure of tree. problem have in case if still need tree, there no data representing specific folder. splitting folder structure use second last entry in array. public shared function parent(byval value string, byval delimiter string) string dim listarray() string listarray = split(value, delimiter) dim lastnonempty integer = -1 integer = 0 listarray.length - 1 if listarray(i) <> "" lastnonempty += 1 listarray(lastnonempty) = listarray(i) end if next redim preserve listarray(lastnonempty) dim retvalue string = "" if listarray.length - 2 > -1 retvalue = listarray(listarray.length - 2) else retvalue = listarray(listarray.length - 1) end if return retvalue end function lets have data in root\, have no data in roo...

php - cakephp file download link -

i've encountered problem i'm trying solve more 2 days now: i've built website using cakephp , working fine got stuck when tried implement download links files stored under app_dir/somefolder/somefile.zip . how set download links files inside somefolder ? stumbled on "media views" tried implementing them far i've been unsuccessful. besides there no easier way make files downloadable? media views deprecated since version 2.3. should use sending files instead. check out minimal example in controller: public function download($id) { $path = $this->yourmodel->amagicfunctionthatreturnsthepathtoyourfile($id); $this->response->file($path, array( 'download' => true, 'name' => 'the name of file should appear on client\'s computer', )); return $this->response; } the first parameter of $this->response->file relative app directory. calling $this->response-...

How can I link this html button to the input type "text" so that when I press enter from the input type, the button is activated? -

here html code form: <form> input twitter id: <input type="text" name="userid" id="userid"> <button type="button" onclick="getstatuses();">get recent tweets</button> </form> currently button activates getstatuses(). want when user presses enter/return after inputting text, activates button. input used in getstatuses() , referenced id of input. you can use onkeyup attribute , call function: js: function checkkey(e){ var enterkey = 13; if (e.which == enterkey){ getstatuses(); } } html: <input type="text" name="userid" id="userid" onkeyup="checkkey(event)">

python - Multiprocess Daemon Not Terminating on Parent Exit -

i have python 2.7 multiprocessing process not exit on parent process exit. i've set daemon flag should force exit on parent death. docs state that: "when process exits, attempts terminate of daemonic child processes." p = process(target=_serverlaunchhelper, args=args) p.daemon = true print p.daemon # prints true p.start() when terminate parent process via kill command daemon left alive , running (which blocks port on next run). child process starting simplehttpserver , calling serve_forever without doing else. guess "attempts" part of docs means blocking server process stopping process death , it's letting process orphaned result. have child push serving thread , have main thread check parent process id changes, seems lot of code replicate daemon functionality. does have insight why daemon flag isn't working described? repeatable on windows8 64 bit , ubuntu12 32 bit vm. a boiled down version of process function below: def _serverlaunchhe...

c# - how to reference linq in user control? -

Image
i'm trying use linq in user control , error reference "system.linq" . error:"c:\program files\common files\microsoft shared\web server extensions\14\template\controltemplates\myusercontrol.ascx.cs(23): error cs0234: type or namespace name 'linq' not exist in namespace 'system' (are missing assembly reference?)" check .net framework version. system.linq supported .net framework 3.5 , above. and write using statement include namespace using system.linq; you can check framework version under properties option of project

java - how to manage session attributes due to post requests, and history -

i have following problem: i want send information between modules (different controllers) using post due security reasons. logic has been this: user searches > clicks on specific item > sends form post request controller > controller shows view of specific item > user clicks on sub-item page > sends form post request sub-item's controller however, because of how post works out, it's giving me "webpage has expired" messages when going subitem page item page. my solution problem save these parameter(s) in java's httpsession , post . not particularly sure how go @ it. for example here snippets of code (for record i'm using thymeleaf view resolver): search.html snippet <tr th:each="customer:${results.pagelist}"> <td> <form method="post" id="gotouser" name="gotouser" action="/customer/"> <input type="hidden" name="acctcustnbr...

algorithm - Hashing and encryption technique for a huge data set containing phone numbers -

description of problem: i'm in process of working highly sensitive data-set contains people's phone number information 1 of columns. need apply (encryption/hash function on them) convert them encoded values , analysis. can one-way hash - i.e, after processing encrypted data wont converting them original phone numbers. essentially, looking anonymizer takes phone numbers , converts them random value on can processing. suggest best way process. recommendations on best algorithms use welcome. update: size of dataset dataset huge in size of hundreds of gb. update: sensitive sensitive, meant phone number should not part of our analysis.so, need one-way hashing function without redundancy - each phone number should map unique value --two phones numbers should not map same value. update: implementation ? thanks answers.i looking elaborate implementation.i going through python's hashlib library hashing, same set of steps suggested ? here link can give me exampl...