Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mystes
May 31, 2006

If anyone has tried making a google docs extension, is there no way to even get it to work outside of a single document without getting google approval right now? I thought that I would only need approval if I wanted to share it, but it looks like maybe at the moment docs extensions are entirely bound within single documents unless you go through the process to put them on the store.

I'm annoyed because I just spent like an hour trying to make a really trivial add-on and apparently it was pointless because I can't even use it.

Adbot
ADBOT LOVES YOU

mystes
May 31, 2006

Hughmoris posted:

I believe that the medical software that my hospital uses is mostly some version of .Net, as window info controls tell me that the windows are "Windows Forms" and an Internet Explorer Server. I just finished up a very rough script using AutoIt that simulates a user clicking through this software application by sending keystrokes and mouseclicks. I realize this is a vague and general question but is there possibly a way to pass information directly to the application in means other than simulating keystrokes and mouseclicks on the GUI?

For example, right now my script clicks in a text field and enters a drug name, then clicks' on a field and enters a drug dose etc... before clicking submit and starting on the next drug. Are there ways to pass that information directly to the application? I've stumbled upon SeleniumHq which is evidently a browser automation but I'm not really sure what that entails. This medical application is definitely using a browser though (IE)

I ask because while my script reduces the time required for this project from roughly 60 hours to 20 hours, it could go even quicker if I didn't have to wait on delayed responses from the GUI.

Any ideas on where I should start?
First, try to look at what the program is doing by using wireshark. If it really is just a web page, you may be also able to just get the URL and then open it up in normal internet explorer which will make it easier to see what's going on. If it goes right to a secure page you may need to use something like mitmproxy or alternatively see if there's some other way to find the URL from the installed files.

What you can do will depend on how it's implemented. If you're lucky, it's really a normal webpage, maybe with some plugins that you don't need to actually touch. In this case you will be able to automate it with any programming language (optionally with something like mechanize which is designed to make this type of thing easy).

If you're unlucky, it could be a local app that generates html, or a page that just embeds one big silverlight app or something, which will mean that you probably won't actually be able to automate it as if it was a web site which will make it much harder or maybe essentially impossible.

mystes
May 31, 2006

Hughmoris posted:

Thanks for this. I have a feeling that it is a local app that generates html. The software is something similar to the Epic EMR package. The kicker is that I'm 99% sure that all the application is doing is writing my entry to a database table. I know jack poo poo about databases but that means if someone had write access to the database, then they could simplify all of this by writing the results directly to the table? This time-sucking project would be completed pretty drat fast if that was the case.
The problem is that unless the software is scarily horrible, it probably shouldn't be connecting directly to a database, which means that you would have no idea what the client/server interface would be like. In this case, your best bet would be to try to see if you could somehow automate the local web page, but assuming it's a program that's talking directly to a browser control (I don't actually know if this is what Windows programs do or not) rather than running a web server on a local port and talking with it, this might be very difficult.

That's why the easiest thing to do is just to look at what you can see on wireshark first, since you will hopefully be able to tell what's being transmitted (even if it turns out to be SSL, that would at least be a good sign that either the web pages or maybe a SOAP API are being used and it would be worth the effort to pull out mitmproxy or whatever).

mystes fucked around with this message at 03:55 on Oct 11, 2014

mystes
May 31, 2006

Squashy Nipples posted:

I build a lot of Office Automation stuff in VBA. I recently came across a rather clever system that someone else built for producing batches of PowerPoint books: while the heavy lifting is done inside of the VBA environment, it's triggered and tracked with a series of BAT files, so that if Office crashes, it will pick up right where it left off. Sadly, my understanding of BAT files never progressed past basic MSDOS autoexec stuff. For example, I didn't realize you could use branching and such.

The part I'm struggling with now are the variables, such as %UserID%, stored so that the BAT can map a network volume.

What is the scope of these variables?
What is their lifetime? (ie, do they expire when the nested BAT executions end, or what)
Are they all Variants, or can I restrict the variable type?
1) Don't use BAT files in 2014. Use anything else. Powershell might be a good choice; normally I'd note that it's annoying in all sorts of ways, but if you can tolerate VBA this probably won't be a problem for you.

2) You might actually benefit from moving some of the VBA stuff into COM automation or whatever it's called these days, too.

3) For that matter, is automating office the best way to actually do what you're doing?

mystes fucked around with this message at 18:49 on Nov 1, 2014

mystes
May 31, 2006

Squashy Nipples posted:

I'm not a real developer, I'm a business analyst. As such, my toolset is limited to whatever is installed on the corporate laptop. I couldn't even install the "Custom UI Editor For Microsoft Office"; I had to install it on own PC, and then stick the EXE on a USB drive. I'm sure there are WAY better ways to do what we are doing, but they all involve money and manpower that are not available. And finally, the output has to be in PowerPoint, because that's what my client's clients are used to, and no way am I going to rebuild a complex 40-page template if I can keep populating the old one within VBA.

My fixing this system is a favor to someone I used to work with.
I mean, they are paying me good money, but paying me for like 20 hours of work is infinitely cheaper then any other option they have, because I designed most of the DataMart when I worked there full time. I didn't build this particular report, but it uses all my data structures and such.

The client is aware the a big investment is needed in a total replacement, but there is a lot of organizational baggage to work through. So, yes, I understand that putting an additional bandaid on top of the dirty old ones is a bad idea, but I'm going to do it anyway.
The computer probably has powershell on it already if it's Windows 7 or higher.

Also, if the content you're populating the powerpoint file with isn't too complicated, it would probably be a million times easier to just edit the XML inside the PPTX file directly. You could probably use some off-the-shelf templating language designed for HTML and be done in like 5 minutes. This way you wouldn't have to worry about stuff like COM automation or office crashing. You could even allow people to edit the powerpoint file and just put stuff like %{companyname} where you need stuff filled in.

mystes fucked around with this message at 20:44 on Nov 1, 2014

mystes
May 31, 2006

Hughmoris posted:

How would one go about creating a simple webpage with a text box, and that text box acts as a search field, and it searches a local folder that is full of files?

I want to gather all of the education material (PDFs and word docs) my team creates and place them in a single directory. That way, users can go to an intranet site and search for whatever education material they need. I'm just now sure how to get started on it.
You really want to use something off the shelf for this.

mystes
May 31, 2006

thegasman2000 posted:

I am not using a framework at all. At this stage its all hand coded in php and html files. What framework should I be using? I am a wordpress guy really :(
In theory the laziest possible option would be to manually handle paypal transactions and use just use an .htaccess file on your server to enable individual, manually managed accounts.

In the real world if the "search, add and list functions are all sorted" before you've even thought about users/permissions/security you're hosed and should start again with some sort of real framework that handles the security parts for you, and possibly some sort of preexisting software intended specifically for multi-user databases.

mystes fucked around with this message at 01:45 on Nov 27, 2014

mystes
May 31, 2006

Reisen posted:

I'm trying to decide if a particular task I'm working on is worth automating.

What I have to do is:

1) Visit a particular website (with permission)
2) Tab to the search field (known location)
3) Enter a unique search ID and hit enter
4) Click the single search result
5) Copy text from the iframe that pops up into a file (the text may scroll)
6) Repeat 4000 times

I've never written anything like this that interacts with a browser (as far as I can tell, the website isn't set up that I could just download the files or visit the intended search page directly; I think this rules out using something like Heritrix, right?), and my quality as a programmer is okay but certainly not good. I currently only have working knowledge of Python, but I regularly pick up languages and then forget them.

I expect this would take about eight mind-numbing hours to do by hand. Not having to do that would be nice, but spending days trying to wrangle with the code would not be great either. With no experience I can't really judge how difficult this will be to do. How much am I biting off here?
What makes you think you'll need to automate a browser specifically(*)? Is it just because you don't see a url like "http://www.example.com/search?query=hello" (i.e. it's using POST instead of GET)? Or is there some sort of complicated javascript magic going on?

Normally you should just be able to 1) send the query, 2) get the IFRAME location from the result, and 3) download the IFRAME page. This should literally be 5 minutes work if there's nothing complicated about it.

If you like python you can use mechanize which uses a sort of web browser metaphor so you can tell it to select the form field and submit the query from the page.

*:It's hard to tell based on your question so I apologize in advance if you actually have a good reason and this comes of as lovely and condescending.

mystes fucked around with this message at 23:00 on Dec 6, 2014

mystes
May 31, 2006

swagger like us posted:

Since the Excel thread is dead I thought I'd ask here.

One of my tedious tasks I have to process is that we'll get a dump of word documents into a shared folder, and these need to be logged into an Excel spreadsheet into their appropriate columns. These word documents are all standardized in terms of paragraph and headings, so it looks something like this:


Typically they are in a standardized format (and by standardized I just mean in Word, i.e. same number of paragraph and spaces etc.). I know that an actual records management system or a real database is the real answer here but thats not gonna happen in my situation unfortunately. In the mean time, Ill have like a bunch of these documents dumped into that folder that I have to log into that spreadsheet, with columns such as "date", "time", "title", "text", "sender" etc. How would I go about automating this so I don't have to just manually copy and paste everything one piece at a time?
Do you know any programming languages? If the documents are really 100% standardized you should be able to easily parse them using regular expressions. Otherwise, I think this is going to be extremely difficult just using word or excel.

If you have to do this without an actual programming language, it might theoretically be possible to make a macro in word to use search and replace add a delimiter between the difference sections and export to a text file. Then you could somehow concatenate all the files together if you can even do this in windows, and open the resulting file in excel and use the right delimiter to import it. However, since as far as I know word's search function doesn't support regular expressions this would be extremely painful, but it might be possible.

mystes
May 31, 2006

Lord Windy posted:

I've been making Interactive Fiction games in my spare time and one of the big issues with the genre is it is not very user accessible. Most games require you to download an interpreter and the file itself, which is fine for people who enjoy IF but it's not easy for people to get started (particularly not tech savvy people). I want to make something that is user accessible and doesn't require the user to download anything. My original idea of using Telnet is really not much more user friendly than what we have now, so I'm investigating some browser based solutions.

I've never done any real webpage stuff, I mean I've done some PHP, HTML and CSS hello world poo poo but that would be about it. So I have no idea on how to tackle this. What sort of technology should I be looking at? Trying to make a telnet client with Javascript seems the easiest option (and probably one that has a heap of Open Source material, if not a complete implementation I can use and just get back to doing IF) but if I wanted to make a full on browser based IF using HTML Canvas and Javascript to capture key presses and send stuff to the server (I know I could make this entirely browser based, but I want to keep the actual game on the server itself. Dissuade me if this is a really bad idea) what should I look at? The only technology I know of are CGI for C/Java and PHP.
Why telnet why a canvas element why why why? The entire point of a web browser is to talk to servers and display text :(.

mystes
May 31, 2006

Exitlights posted:

I'm looking to start developing amateur apps for my MS SP3 that have all the whizbang fullscreen and touch poo poo, and I'm having a hell of a time finding what I'm looking for with Google or (probably) knowing the right way to ask it. Like the stuff I'm finding so far is the Touch SDK for Windows 7, only compatible with Visual Studio 2010, and that doesn't seem right. Can somebody point me at some resources or a thread or anything on setting up a development environment and walking through creating a basic touch-y "hello, world" app?
Don't you just need to make a normal Windows Runtime/Modern/Metro/Windows store app or whatever they're calling it now?

E.g.: https://dev.windows.com/en-us/getstarted

edit: ^^^ argh beaten

mystes
May 31, 2006

hooah posted:

I'm not sure if this would be better here or in a math thread, but I'll start here since it is computer science in nature. In my distributed systems class, we've been talking about safety and liveness. I understand the professor's definition of safety well enough:


However, it seems weird to me to define something by exclusion. The definition in the (apparently) landmark paper,

is a little complex for me to understand all at once, however, but it seems like it might also be definition by exclusion? If that's the only way to define a safety property, that's fine, but I'd like to be able to understand that more complex definition anyways, if anyone could help me out.
I don't know anything about distributed systems or any of the notation in your post but I suspect that those are the same definition, with the second version just being written more rigorously.

mystes
May 31, 2006

Sinestro posted:

I'd suggest Elm.
I don't think this will help for "recent game engines being released for free(ish) " (I'm assuming this is referring to Unity and Unreal Engine).

I think C# would be a good choice because it's supported by default in Unity and there appears to be a module adding support for it to Unreal Engine 4 using Mono, plus it's easier than C or C++ and will be fairly transferable to other stuff. Otherwise, Unity and Unreal Engine both have their own scripting languages.

mystes
May 31, 2006

Shaocaholica posted:

Curious on peoples thoughts here on the feasibility/difficulties in running something like Maya or Solidworks inside a browser. I'm sure plenty of people have already looked into this including the developers of similar products. Basically being able to pay a fee and use one of these '3D' apps with minimal local files over the web. You can do a lot of neat stuff when the app doesn't have to be maintained locally by either an end user or IT team.
What do you count as "inside a browser"? If remote desktop stuff running in a browser counts, you could probably do this today with the right AWS instance. For non-3d stuff, Adobe already has a beta version of Photoshop for Chromebooks that works in this fashion. If you mean javascript, it might be possible to some degree at the moment (I don't know if webgl would be enough) but probably not currently worth the effort.

mystes
May 31, 2006

Biowarfare posted:

https://www.google.com/alerts with a bunch of inurl: and site: keywords
Doesn't Google alerts really only work on Google News now, rather than the web in general?

mystes
May 31, 2006

Bruegels Fuckbooks posted:

You can't do OLE automation with Chrome.

Did you try playing with the compatibility view settings in IE to see if you could get the site to work, or changing the user agent string? It's extremely rare that something would have changed between IE versions that would break a site between IE6 and 8, yet work in Chrome at the same time - the site may just be checking browser versions and saying it doesn't work.
It doesn't sound like Reik upgraded from IE 6 to 8 which broke the site. Rather, it sounds like the site now requires a version of IE newer than 8, which is why it also works in Chrome.

mystes
May 31, 2006

TacoHavoc, you say that people are going to be connecting through an app, but is the app going to be accessing the device only from within the local network or remotely? If remotely, is there a centralized service that the app is going to use to access the device? In other words, does the user actually need authenticate the device directly, or does the user just need to access a central single server that can then authenticate the device? (This is the standard solution in consumer-oriented networked appliances, but you probably don't want to use this approach if you don't have to.)

Otherwise, how does the app find the device? By manually entering an IP? By some sort of discovery protocol?

mystes fucked around with this message at 13:36 on Oct 25, 2015

mystes
May 31, 2006

TacoHavoc posted:

Usually from within the local network. Sometimes remotely.

The app finds the device by IP.

I realize how stupid this all sounds, but based on the mix of situations this product is expected to work in (potentially unconnected to the internet, absolutely operated by the technically inept, across a variety of platforms), it just seems like there aren't a lot of good answers to a lot of the system architecture questions.
The problem is that SSL isn't going to do anything without being able to know you're actually taking to the right device (to prevent mitm). Probably the most you could do is just a self-signed certificate with a fingerprint that you print on a piece of paper that comes with the device.

You could also use your own CA that the user would have to trust but it's not going to do much good without domain names; it would pretty much only allow you to add a preassigned name that would show up in the certificate.

It might actually be better to just enable SSL as an option so that companies that are competent and either have their own internal CA or understand self signed certificates can enable it. This would make the chain of trust the user's problem.

mystes fucked around with this message at 14:24 on Oct 28, 2015

mystes
May 31, 2006

22 Eargesplitten posted:

This is probably really obvious, but I'm not figuring out what to google. In powershell, I'm making a script to archive old items in some folders. I'm having trouble at this line: move-item -path $olditems\ -destination "C:\Users\me\DownloadsArchive. Olditems is everything in downloads that hasn't been accessed in 30 days. The thing is, it wants a specific file name. Do I have to do a for each object to get this to work?
Yeah, I think so. It's sightly confusing coming from bash because move-item will accept wildcards, but this is functionality within the cmdlet, rather than the shell automatically substituting a list of files, and I believe it will otherwise only take one file at a time.

So do a foreach-object:
$olditems | % {mv $_ C:\Users\me\DownloadsArchive}

mystes fucked around with this message at 06:07 on Nov 2, 2015

mystes
May 31, 2006

NihilCredo posted:

I have a few coworkers who struggle with regular expressions. Would it be a good idea to introduce VerbalExpressions into our code base? Has anybody used it and liked it?
Are your coworkers struggling with assembly language too? Maybe you should try VerbalAssembly(TM):
CopyValuetoRegister(0, RegisterNumber1).IncrementRegister(RegisterNumber1).AddFirstRegistertoSecondRegister(Register1,Register2).GotoSection("My Section")

mystes fucked around with this message at 20:34 on Nov 15, 2015

mystes
May 31, 2006

I have a windows/C++ related question (I'm not sure if there's a more specific thread this would fall under?): For a really dumb reason, I want to modify a method in a C++ COM library DLL but that isn't included in the COM interface by which the DLL will actually be used. In the unlikely event that I'm understanding how this stuff works correctly, can I theoretically just create a replacement DLL that in its DllGetClassObject substitutes another method and returns the result of the all get class object function from the original DLL?

Edit: oh I see. This won't work because only the methods exposed through com interfaces go through virtual function tables. Hmm. I guess this is getting to the point where I would need to know assembly to start messing around with it.

mystes fucked around with this message at 06:17 on Dec 2, 2015

mystes
May 31, 2006

Bruegels Fuckbooks posted:

You can use Microsoft detours to do this. See "http://www.codeproject.com/Articles/30140/API-Hooking-with-MS-Detours" - it's possible to detour arbitrary functions if you know the address of the function.
Thanks. This is exactly what I need.

I was able to figure out the address of the function by mucking around in IDA Pro and comparing the dll with another dll I compiled with debugging symbols from source that I know the first DLL is based on. Now I just need to make sense of the examples for hooking C++ member functions. It's annoyingly a bit more complicated than C functions, but I think I'll be able to figure it out.

Unfortunately, I've realized I don't actually understand how computers/compilers actually work at all. This is probably an embarrassingly dumb question, but here it goes: I want to open a file when the DLL I create is loaded and I hook the function. Then I want to write to the file when my replacement function is called. But how can I give the file handle to my replacement function? Can I just use a global variable? Will this actually be accessible from within the replacement function?

(Are global variables just assigned a specific memory address rather than being on the stack?)

mystes fucked around with this message at 16:24 on Dec 2, 2015

mystes
May 31, 2006

Bruegels Fuckbooks posted:

I mean you could just declare a global file handle and pass it, but you're cruising for a bad time trying to do file IO in a trampoline function. Like if you don't know what you're doing, just use ::outputdebugstring function whenever you need to log and run dbgview.exe to collect the logs if you need it.
I'm already using outputdebugstring for logging in the DLL I made for detours since I wrote that post, but I need to output a lot of data (a muxed video stream) , and I'm already going about this in as wrong a way as possible, so what the heck.

The other alternative would be to go back to square one and manipulate the directshow graph (the COM DLL in question is a directshow filter) which is theoretically what you're supposed to do, but the filter is a complete piece of poo poo that's apparently only intended to work in one magic sequence of hackish filters for this one program and keeps crashing when I try to mess with it through the normal methods.

I have a prototype for detours now anyway but I won't actually be able to test it for a week now unfortunately. The C++ magic to get it to work with the thiscall calling convention is quite scary and I doubt it will work on the first try. If file io directly from the function doesn't work well I'll have to try something more complicated.

mystes fucked around with this message at 05:38 on Dec 3, 2015

mystes
May 31, 2006

Gothmog1065 posted:

Okay goons, help point me in the right direction.

Basic info:

OS: WIn 10 Pro
Current programming knowledge: Low level python (3), some VBS, no access to powershell (that I know of yet).

My manager has tasked me with something and I'd like to get some pointers on the best way to accomplish this. I have a list of computer names that is currently in a spreadsheet. I can export this to a .csv if it would help. What I want to do is take this list (It's 85 computers long), iterate over the list, and create a new text document when run that lists the computer name, the owner (Going to have to get specifics if this is the last user logged in or if it's according to this spreadsheet I have, or if I need to pull it from AD), possibly the IP via nslookup or however.

I know this should be fairly simple, but here's the question: What is the best/easiest way to go about this? I can set up a python script, and put it in a self-contained .exe (Not sure if py2exe is supported with 3.5). Or can it done via a simpler method such as creating a .vbs or something else?
When you say you have "no access to powershell" that just means the default execution policy is set, right? Or you actually can't even get an interactive powershell session? Because if the former, this is the sort of task powershell is good for and, hey, until you have the permissions worked out there's always "powershell -executionpolicy bypass script.ps1" (if you're on a domain you should probably sign the scripts when you actually distribute them, and have the execution policy set to allow signed scripts only, though).

Otherwise, you can no doubt do this in python, as well. Definitely try to avoid learning vbscript in 2016.

mystes fucked around with this message at 01:49 on Feb 19, 2016

mystes
May 31, 2006

You probably want to use wmi directly to do this programmatically though, rather than parsing the output of one of these commands. I think you can do this in either powershell without anything extra, or in python if you install the wmi module.

mystes
May 31, 2006

TooMuchAbstraction posted:

Jesus Christ, no. You want to bind your parameters into a query, and let your query library handle escaping quotes, etc. for you. In general, if you are generating a query by inserting variables into strings, You Are What Is Wrong With Databases.
I want to somehow believe the question was about parsing the string to insert different parts of it into different columns, but then the database part would have been irrelevant to the question, so I don't know what to think.

mystes
May 31, 2006

fletcher posted:

I want to force a HTTP request to a particular host timeout in order to test something. Any sort of iptables or hosts file trickery I can do to achieve that?

edit: This seemed to work: http://stackoverflow.com/a/904609/400503
If you did need to use iptables, that's really easy, too; you just need to drop outgoing connections to the host.

mystes
May 31, 2006

P-Value Hack posted:

I know in the real database world, MS Access is poo poo on a lot for being bloated and dumb, but nevertheless, I have no programming skills and all I need is a simple database (not even really relational in structure, there's only one table) to store contact information. So, is there a thread in Cavern of COBOL for MS Access questions?

I've tried googling but no results, I want to make a simple .pdf form where the fieldds (like name, phone number, address) etc. can be filled out, and then I can automatically import that completed .pdf into my MS Access when I receive it back from them, just so I don't have to retype it into the data entry form in MS Access that I created. I can't seem to word my Google correctly to find a website with an instruction on this, even though it seems like a fairly simple request, I keep getting other results.
I haven't tried either of these personally, but:
Option 1 ($): Use Acrobat (probably pro) to create form, and then use Acrobat to export the form data into CSV files, which you will be able to import into Access with a little work (the easiest way is to create a table with columns that exactly match the names of the columns in the CSV file).
Option 2: Use libreoffice to make the form and then use any of various programs/libraries. Pdftk is a simple command-line program that can dump pdf form data, but it's not in a csv format, so you might need to write or find a really simple program to fix this.

mystes
May 31, 2006

ulmont posted:

You're right since the OP has no programming experience, but if you ever want to read text data out of a PDF in Java, Apache PDFBox is pretty good at it.
https://pdfbox.apache.org/
I think in most cases, if just working with just the dumped text out of pdftotext or whatever isn't enough, you're probably better off reconsidering whether you really need to do what you are planning on doing before resorting to this.

P-Value Hack posted:

Yes, I think I'll either try the first one (since I do have Acrobat Pro I believe) or just use a Word document instead.
If there's no reason you specifically need it to be a PDF, you might want to consider other options. Google forms as suggested by JawnV6 is probably the best idea.

Otherwise, there are lots of ways if you can program, but if you can't, it's sort of ugly, but one option is to create an excel file with two tabs. The first will be a "form" for entering data with all the cells that aren't fillable being locked. The second will be a hidden tab that uses formulas to convert the data from the first tab into a proper format to import into access.

Office might have some sort of built in form filling thing, but you probably wouldn't want to actually use it even if it exists (or still exists).

mystes fucked around with this message at 23:53 on Apr 8, 2016

mystes
May 31, 2006

Pryor on Fire posted:

Is this "machine learning" fad the reason google search results and netflix suggestions keep getting shittier and shittier?
When you're trying to find the best way to select 50 movies to display out of a catalog of 50 movies, machine learning is not a huge help.

mystes
May 31, 2006

TooMuchAbstraction posted:

I'm not an expert on these matters, but no, it won't be, because the full frames aren't encoded raw into the file -- as you surmised, the file is compressed so that it doesn't need to store everything. If you were to download the raw form of one of those 24-hour-long YouTube "videos" that's just a blank screen with the Enterprise engine noise on repeat, you'd get a single frame of video and the audio track and that's it.
Video files are usually encoded with a maximum time between independent frames (key frames) so it isn't necessary for the player to decode an arbitrarily large amount of the file when seeking. As a test, I downloaded an approximately 3 minute long youtube video that was just a still image, and it still had 39 I-frames, so you probably aren't going to get a 24-hour-long video with just one frame.

Edit: Oops, beaten by like 15 minutes.

Skandranon posted:

most modern video encoding uses a combination of keyframes (which effectively perfectly represents a frame, compressed) and b-frames (which contain delta information from the last keyframe)
This is close. Modern codecs have I-frames (keyframes), P-frames (which reference previous frames), and B-frames (which can reference previous and subsequent frames). Also, with P/B frames, it's not necessarily keyframes that are referenced (it would be inefficient to require this). I think with mpeg2, P-frames could only reference the previous frame, for example, which meant that decoders only had to keep one previous frame in memory. As a result, the importance of keyframes isn't necessarily just that they serve as references for B/P-frames but that they make seeking easier. For example, even with only I and P frames, and the P frames only referencing the previous frame, if there was only one I frame in the whole file, if you tried to seek half way through the video, the player would have to decode the entire thing up until that point, because every frame would depend on the previous frame going all the way back to the start.

mystes fucked around with this message at 03:09 on Jul 7, 2016

mystes
May 31, 2006

wargames posted:

This is not worth its own thread but is involved, my coding skill level is basically zero, but my overall computer knowledge is fairly ok. I've managed to bang together a website, I self host a wordpress site, I run mybb forums, doku wiki, and soon rocket chat on this site. Right now I have wordpress doing my auth for the site. I have mybbsync plugin inside wordpress so when you go to login on mybb wordpress pushes the info into the mybb sqldb. question is how do I make it so they just sign into the website and click on the forums and have them auto login? This can also be asked of dokuwiki I have the wordpress auth plug for dokuwiki, I would like a SSO just don't know how to go about that. pretty sure I am making no sense at 3am but i am stumped.
You're gong to have to either modify all the software to use the same sessions, or modify the login processes to check the sessions for the other software. Since all of these things appear to be written in the same language (PHP), it probably wouldn't be insanely difficult to do the former (mostly cut and paste, probably), but you're going to need more than zero coding ability.

Ideally, if the sites only store a session ID in their cookies, and have some sort of session database is just a simple mapping of session ID to user ID, then you would just need to change the functions that check the session and that get the username to use the equivalent from wordpress. This way there wouldn't even be a separate login process. Being logged into wordpress would mean being logged into the other software as well.

However, there are going to be lots of annoying details in terms of synchronizing user databases (the different programs will probably have their own database schemas for user information, etc., and you might have to translate user numbers if the programs pass them around internally) and it's probably going to be a pain to get everything working perfectly.

mystes fucked around with this message at 13:04 on Jul 8, 2016

mystes
May 31, 2006

ToxicFrog posted:

You can, that's how screen/game streaming software like OBS or Steam Home Streaming work.
Well actually you can't do it quite like the extremely efficient way Steam does it it on Nvidia cards (NVFBC) unless you pay $$$ to Nvidia.

mystes
May 31, 2006

LOOK I AM A TURTLE posted:

The plan is that on a successful login the server will generate a signed token that contains at least the user's ID and a security stamp... The server decrypts the token and verifies that the security stamp matches what's in the database. If it does, the user is logged in.

Please tell me about all the fatal flaws in this plan.
Nothing but it's unnecessarily complicated. Rather than using encryption, which is easier to screw up, just generate a random code (the "security stamp") and use that. If you're storing the code on your server there's no reason for a cryptographic signature (and not storing the codes and just relying on signature would probably also be a bad idea, since there would be no easy way for you to revoke them).

mystes
May 31, 2006

http://stackoverflow.com/questions/13817452/how-can-i-generate-a-cryptographically-secure-number-in-sql-server

Use CRYPT_GEN_RANDOM

mystes
May 31, 2006

ultrafilter posted:

Is there a good quick introduction to Excel's dialect of Visual Basic? I'm trying to reimplement an algorithm that's in that language, and it's tough going cause it's kinda weird.
There used to be books, probably. Googling specific things (with the names of equivalents in other languages, for example) is usually the best bet.There are still some websites abut it and the language itself is the same as vb6. When you're not dealing with the excel object model its pretty simple but extremely limited. It only becomes a nightmare when you have to interact with excel objects in complicated ways.

I've had the misfortune of trying to use it lately so if you have any specific questions I might be able to help.

For data-intensive stuff that doesnt need to directly interact with the object model you might want to look into making an xll plugin with excel DNA if possible; it can be a lot easier than doing everything in VBA.

mystes fucked around with this message at 20:35 on Jul 11, 2016

mystes
May 31, 2006

cybertier posted:

It should be able to interface with Excel to fill placeholders in a Spreadsheet (xlsx) with information that is gathered through the application.
Seriously don't actually interface with excel unless you have to. It will only cause you pain. Look at the ClosedXML library to generate excel files.

mystes
May 31, 2006

rjmccall posted:

http://www.pcworld.com/article/2365240/intel-expands-custom-chip-work-for-big-cloud-providers.html

I can't talk about any specifics; a lot of this stuff is confidential. (To be clear, I don't actually know any specifics about what Apple does here; I'm curiously better-informed about completely different companies.)
How can this possibly be worth the cost?

mystes
May 31, 2006

Suspicious Dish posted:

This is Sun Microsystems levels of naivety.
Don't you want your Android app to be 100% Pure JavaTM certified? You can use this nifty logo:

mystes fucked around with this message at 02:24 on Aug 24, 2016

Adbot
ADBOT LOVES YOU

mystes
May 31, 2006

Fergus Mac Roich posted:

If you were writing a little internal web app that had to (sigh) fetch its data by using a proprietary app accessed only through ssh, what FOSS glue would you use to allow your web app to drive your ssh session?
Are you sure this is your absolute only option? Is the server or network appliance or whatever under your control? Can you get an actual shell on it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply