Posts

powershell outlook showing content from other e-mail -

i have powershell script prints senderemailaddress, , subject. problem when asking content get-content $txtcontent | select -index 23 content e-mail. maybe there method clear cache or because content previous e-mail , don't know how fix this. $txtcontent= "c:\test.txt"; $matchstring= "info@blabla.com"; $olfolderinbox = 6 $outlook = new-object -com outlook.application; $mapi = $outlook.getnamespace("mapi"); $inbox = $mapi.getdefaultfolder($olfolderinbox) $inbox.items | select -last 1 senderemailaddress,to,subject $inbox.items | { $_.senderemailaddress -match $matchstring } | out-file $txtcontent get-content $txtcontent | select -index 23 when using get-content $txtcontent content of e-mail need. when need line 23 content another, previous e-mail

java - Android ViewPager doesn't show Fragment -

i'm trying let viewpager show fragments, however, doesn't seem work. not showing anything, not height. can tell me step missing? thanks main_activity.xml: <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorbackground"> <android.support.v4.view.viewpager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/bottomnavigation" /> <com.aurelhubert.ahbottomnavigation.ahbottomnavigation android:id="@+id/bottomnavigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom"...

sql - Transposing and then exporting a table to a CSV file -

Image
i have sql table 3 columns such: i write script in amazon redshift (uses postgresql 8.0.2 believe) exports above table csv file transposed. transposed mean create new column each cobrand (there 4 distinct values in cobrand_id column) in csv file. illustrate want, included image (the values illustrative!): when try: copy temp_08.jwn_calc 'p:/sql_new/products_199.csv' delimiter ',' csv header; i error: [42601] error: syntax error @ or near "header" position: 74 when remove "csv header", error: [0a000] error: copy file xen-tables not supported help appreciated! transposing to transpose data, you'll have write query names each column, such as: select qqyy "quarter", sum(case when cobrand_id = 10001372 sum end) "10001372", sum(case when cobrand_id = 10005244 sum end) "10005244", sum(case when cobrand_id = 10005640 sum end) "10005640", sum(case when cobrand_id = 10006...

memory - java.lang.OutOfMemoryError: Java heap space creating a long list of Myclass -

i'm parsing data internet create arraylist every politician class has field hashmap. every hashmap contains 132*150 entry. after 164th map filled got exception: java.lang.outofmemoryerror: java heap space. wanted store big list using serialization use in future. how should proceed? should serialize politician instances , not whole list? there other optimal way store data? (if needed) i'm writing data files. thinked store data "as object" improve ease of use. code: private static void setvotiparlamentari(parseropenparlamento parser, arraylist<politician> politicianlist){ for(politician p : politicianlist){ string filepath = system.getproperty("user.dir") + file.separator + "io_files" + file.separator + "info_parlamentari2"; string filename = file.separator + p.getname() + ".txt"; iterator<string> votesiterator = parser.parsepoliticianvotes(p).iterator(); filewriter w = null; try { w =...

clear terminal (and history!) in Python -

this almost duplicate of clear terminal in python , not quite. that question reads: standard "comes batteries" method exist clear terminal screen python script, or have go curses (the libraries, not words) ? all of responses there result in happens when enter clear on terminal - on screen disappears except empty command line @ top. but, if you'd like, can scroll see doing earlier. i'm looking way this, not allow user scroll up. it's equivalent of command+k on macos. the application multiplayer card game, , don't want player able scroll see player's hand. you use subprocess.call() standard library subprocess module send reset command terminal reinitialize terminal , in effect similar clear clear scrollback history. import subprocess subprocess.call('reset') alternatively, have learned this answer , can use command tput reset instead, clear terminal instantly, whereas reset alone experience slight delay. can called s...

c# - Unity physics - how to make objects bob down then up as if in space with gravity? -

alright, getting physics here in unity , ive been through unity's forums well, cant figure out how create specific gravity related effect - i have these rigid bodies of mass 100 able push off platform (my game bunch of platforms set in space) open space. because checked affected gravity, fall. what need objects slide off platform, fall little bit bob , stay there floating. if pushed off in space, cant keep going. bob down, up, stay , float. this seems lot more complicated thought, ive played gravity , high values fall straight down (not out, obviously) , low values float above when pushed off. there doesn't seem sweet spot neither go down or up, bob. how can achieve this? masses 100. my suggestion implement force function tries resemble arkimedes' principle. key potential dependant on how far down object is: further down water object is, more lift force. such, key function here (and tricky one) volumebeneathsurface . double liftforce(object) { con...

xcode8 - LLVM Kaleidoscope examples in Xcode -

i'm working llvm kaleidoscope ch. 7 example, , use xcode 8 work on project further. currently, have used cmake build xcode project have functionality looking for. (see http://llvm.org/docs/cmake.html ) the problem is, builds entire llvm source folder inside 1 giant xcode project (think 134 dependencies, takes 800 seconds compile, etc...). want 1 target , 1 source file huge xcode project, not else. the problem, though, don't know how link appropriate headers , llvm source when create own xcode project. option use make -g xcode ... path_to_llvm_root so, guess what's left figure out way isolate 1 target/settings out of dozens , copy on new project. does have experience llvm kaleidoscope examples within project?