Posts

excel - Want to read Worksheets from a workbook using Python Wincom32 -

i want read worksheets workbook using python wincom32 module not able read if number of sheets more. example have excel workbook total 150 worksheets in , trying read 89th excel worksheet using python wincom32 module giving me sheet name not present in excel workbook @ all. using below python code import win32com.client dispatch = win32com.client.dispatch excel = dispatch("excel.application") excel.visible = 1 wb = excel.workbooks.open('<path excel>') count = wb.sheets.count # count stores total number of worksheets present print count ws_name = wb.sheets[ 89 ].name """ supposed read name of 89th worksheet instead giving me garbage name """ print ws_name there mistakes in code: 1) instead excel.visible = 1 should excel.visible = 1 , 2) instead excel.workbooks.open('<path excel>') - excel.workbooks.open('<path excel>') 3) instead wb.sheets.count - wb.sheets.count , 4) instea...

arrays - Trouble sorting and aggregating cell data in excel using VBA -

i have updated this update highlights changed part of code remove unnecessary commas in resultant sheet8.l5 field. also implemented suggestion suggested feelththis. now returns "1,9" instead of desired "1, 9, 29, 37, 50, 61" original (slightly changed post) i trying cell data 3 sheets, 5 cells per sheet total of fifteen cells. remove 0 values. numerically order remaining. insert single cell on sheet comma delimited. cell data should contain positive, whole numbers. i have provided sample of data looks , code below. if there better way of approaching way attempting open other solutions. the code below return error in aggregateseptember() line returns error has comment explaining it. thank feelththis. after execution sheet 8 l5 should = "1, 9, 29, 37, 50, 61" i totally stumped , haven't written vb before, appreciate this. thanks in advance time , consideration, tim the data below before vba runs. after code runs sheet8.l5.val...

c++ - Performing string operations on data that might contain null \0 -

i'm implementing pluggable mime filter ie (this question concerns iinternetprotocol::read(void*, ulong, ulong*) ) , i'm intercepting incoming html view modify html. the html generally utf-8 encoded, except there \0 (null) characters, , sits inside char buffer. want load inside std::string instance can perform string operations such std::string::find inserting content (by copying substrings destination buffer around injected string, this: string received( this->buffer ); size_t index = received.find("<p id=\"foo\">"); if( index != string::npos ) { memcpy( destination , received , index ); memcpy( destination + index , "injected content" , 17 ); memcpy( destination + index + 17, received.substr(index), received.size() - 17 - index ); } else { memcpy( destination , this->buffer , this->buffersize ); } the problem buffer might contain null bytes (it...

.net - when a method is called , which thread will be run in c# and java? -

everybody knows using multi threading platforms , developing multi threading applications. way, couldn't recognize thread issue. when call static method (that in class.) , thread run ? gui thread go jobs , run method ? i.e: (i gonna give vb code sample . logic same java.) private sub runvaluestest_click(sender system.object, e system.eventargs) handles runvaluestest.click dummyclass.instance.dojob() end sub() this vb syntax not matter . main logic same c# , java. when click button, new thread run ? or gui thread go job ? if new thread run, why , when use new thread our jobs ? if gui thread goes, see lots of time more 1 thread run in program. how can threads different in program? why , when thread exceptions occurs somehow ? example: doing file operation in method: (this may different question) private _file system.io.streamwriter private sub runvaluestest_click(sender system.object, e system.eventargs) handles runvaluestest.click if not directory.exists("...

eclipse - display a label after the Button is clicked in Java swing -

i want display label, when button clicked. using eclipse juno. have label added , setting visible part... wlabel = new jlabel("you , me"); wlabel .setvisible(false); wlabel .setbounds(80, 35, 100, 25); wlabel .setfont(new font("meiryo", font.plain, 9)); wlabel .setforeground(new color(255, 102, 21)); add(wlabel); the button wbutton = new jbutton("w"); wbutton .setactioncommand("mybutton"); wbutton .addactionlistener(this); wbutton .setfont(new font("meiryo ui", font.plain, 11)); wbutton .setbounds(10, 33, 70, 35); wbutton .setbackground(new color(102, 51, 20)); add(wbutton); and here actionperformed. implemented actionlistener public void actionperformed(actionevent e) { // todo auto-generated method stub if (e.getactioncommand().equals("mybutton")) { wlabel.setvisible(true); } } initially can set visibility false of label , after clicking...

node.js - How to sort, select and query subdocument in mongoose -

so i'm trying sort subdocument, select , everything. seems can't regular query tried w/ aggregate mongoose = require("mongoose"); mongoose.connect("localhost:27017", function(err) { mongoose.connection.db.dropdatabase(); story = mongoose.model("story", { title: string, comments: [{ author: string, content: string }] }); sample = new story({ title: "foobar", comments: [ { author: "a author", content: "1 content" }, { author: "b author", content: "2 content" } ] }); sample.save(function(err, doc) { story.aggregate([ { $match: { _id: doc._id }}, { $unwind: "$comments" }, { $project: {"comments": 1}}, { $sort: {"comments.author": -1}} ], function (err, result) { if (err) { console.log(err); ...

ios - xcode compilation errors after xcode 6 update -

since upgraded xcode 6 project not compile anymore, cleaned several time, restarted, deleted derived data didn't help so went xcode 5 , have errors on xcode 5 project working project repository , it's working on colleague's mac... i didn't change don't understand , aprreciate help the errors error: unable open executable '/users/mobiledev/library/developer/xcode/deriveddata/myapp-bqkgvjwrncaywqgcyydyxfwxsvio/build/products/debug-iphonesimulator/myapp.app/myapp' ld: framework not found avkit architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) had same trouble, i've set target membership in file inspector of framework. find avkit framework in project , try method, may help.