topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 12:06 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - capitalH [ switch to compact view ]

Pages: [1] 2 3next
1
Living Room / Re: The Pirate Bay - Domain Updates & Prison
« on: February 02, 2012, 11:47 PM »
Changing the domain name to the Swedish domain .se puts the address out of the reach of US authorities. Along with the name change the defiant Pirate Bay operators changed the logo from the traditional ship to a closed fist (above) and issued a statement via their official blog:

did anyone else notice that the new logo is similar to f0dder's avatar? :D



Who lives in Denmark - across the sea from Sweden.


2
This will be a large file containing user data. There will be external files stored in their raw formats (jpeg, pdf, etc). I was debating about an already designed database system like sqlite, but also know that I have written my own file save procedures in the past and it has worked out nicely.

I was advised AGAINST XML because of the sheer complexity of implementation. There is no desire to export this data, as my application will be the first in its industry.

I don't think you can underestimate interoperability and ease of access. Users will thank you for it, if they ever need to access the data outside of your app.

I wouldn't say XML is complex, as long as you can use a 3rd-party parser that does the heavy lifting for you. But it is (a) relatively slow to read (b) wasteful when the tags take up more bytes than user data (c) potentially memory intensive, depending on the parser and how you use it; (d) brittle, because a single wrong byte may prevent your app from loading any of the data (that's particularly important if your users may ever fiddle with the data files themselves).

But XML is very useful and flexible when you need or expect to (a) represent hierarchical data; (b) store data of different types, including binary; (c) modify and expand the capabilities of your app or your data files. You can easily add a new tag to store a new piece of data, which earlier versions of your app may just ignore without breaking. Doing the same in custom binary files takes more work, as you have to introduce some sort of "file version" marker and check for it all the time (version 1.1, so expect a date now; version 1.2, time is now stored as UTC; version 1.3, added a comment field here...) That last thing is much easier to do with XML.

You could also design your custom "binary" format that is structured like XML, with numeric identifiers instead of tags. That worked for me once, but after that I decided SQLite was easier and faster and more capable to begin with.

SQLite is really neat in that it doesn't need a server or any complex installation (or any db license). If you use MySQL, who's going to install it, and who's going to do tech support for MySQL issues, for example? For me, the main advantage of a database is that you can read and write small portions of your data instead of the whole datafile at once. And you get a lot of built in logic for free via SELECT queries that you would otherwise have to devise yourself. Frequent disk access is an obvious downside, although you can configure your SQLite database to stay in RAM (by specifying a sufficient cache size or even explicitly copying the db to RAM).

Another downside of SQLite for me is: interminable query strings everywhere. I do keep them all in once place actually, but unless you generate all of your SQL at runtime, you may end up with hundreds of SELECT statements that are hard to maintain. If you add a column to a table, you need to go through all of them to see which ones must be modified. I hate that part, and you can of course parametrize the queries and glue them together from pieces, but the pieces still remain as string constants, and that's bad. Still, right now I wish I'd written almost all my apps with an SQLite backend, and I'll be using it for practically every future project I can think of. It's really flexible, and by far the fastest database engine on the desktop.

I am more a data guy than a programming guy (statistician by trade) so here goes my 2c:

XML - very useful for hierarchical data, and easier to use than it looks at first. Though my first attempts failed miserably (when I attempted to do my own parsing) with MSXML (or potentially another library) it is dead easy. Speed is not an issue with smallish data (I used it successfully for 10 000 records, about 50 attributes per record, very hierarchical) - though I only use it during load/save - not updating it continuously.

sql (or other database) - very useful if you mostly work on subsections of the data, or if you have huge data and can with with a subsection at a time.

CSV - my personal favorite. Works everywhere, you decide the format. Open and transparent. For some protection - compress it before saving. Does not work that well with huge data (limited by memory usually).  Does not work well with hierarchical data or data that can have a variable number of attributes per record (say for example you have a bunch of projects (records) and for a project a list of people working on it - you will probably have to have a cell that has a separator which)

3
Living Room / Re: I Finally Got A New PC!
« on: January 06, 2012, 03:52 AM »
(Dunno why but I only have 5.74 Usable...?) 
is because of
(On board 256MB Memory)
But congrats in any case.

4
Living Room / Re: Sync Google Contacts with Windows 7 Contacts
« on: January 05, 2012, 12:22 AM »
Do you
1) Want 1-directional sync?
2) Want this as an once-off (and not automatically done daily or such)
3) Is the direction Windows -> Google (assuming (1) is yes)

If the answer is yes to all questions, just dump the Windows contacts in a csv file, format it in Google's format, and import it.
I did it this way when I migrated to Google..

5
Post New Requests Here / Re: IDEA : universal on-screen search tool
« on: January 05, 2012, 12:19 AM »
This might also be useful for programs with an insanely outdated search facility (I am looking at you *.chm)

6
To add a little humor to this thread, here's a discussion we had in IRC a few days ago about this topic:

<Deozaan> Why doesn't the internet use public/private key authentication instead of passwords?
<Lashiec> because they're still working on that
<Deozaan> What do you mean?
<Lashiec> making it easy for everyone, I mean
<Deozaan> You can do that for e-mail, can't you?
<Lashiec> with something like this: https://www.donation...ex.php?topic=27343.0
<Lashiec> PGP?
<Stephen66> biometrics would make life so much easie
<Stephen66> easier
<Deozaan> Not if you were undead!
<Deozaan> Because you know... undead don't have fingerprints...
<Deozaan> or retinas to scan
<Stephen66> why dont they have finger prints
<Deozaan> I dunno.
<Deozaan> For some reason I was thinking biometrics meant like having a pulse.
<Deozaan> But then I realized my mistake and so I started sarcastically making excuses as to why I was still correct.
<Stephen66> lol
<Lashiec> you can use the inflexion of their voice when they say "BRAAAAAINS" as a secondary authentication method
* Deozaan laughs.
<Stephen66> lol

Truth be told, I am cool with the undead not being able to access anything on the Internet.

Banks... <shudder>
My default password scheme is a key-pattern mix of uppercase/lowercase numbers/special characters based on something in the name of the website I'm accessing (a Dvorak keyboard would seriously screw my world).
My bank doesn't allow special characters  :huh:
IBM Developerworks only allows special characters @#$%&*  :huh: IBM!!
The government jobs website allows special characters, but only certain ones, and it doesn't say which ones.  :'(
There's no such thing as a paper job application any more, so I've had to sign up with a hundred websites, all of whom have differing password requirements (yeah, identity theft nightmare waiting to happen, but hey, I'm just a laid off schmoe begging for a spot on the payroll, what do they care?).

So, yeah, something needs to be done about the current username/password thing.
I'm all for whatever encrypted handshake thingamabob that needs to happen to make ID theft harder, but after reading everything I can stand about electronic security, I've concluded that your info is only as secure as the server it's stored on.

KeePass Portable to the rescue!

I just use the longest possible password allowed with as much special characters as allowed. I find it staggering to find the restrictions some websites have (6 digits? Really?)

7
It's all a matter of credibility and trust.  And in this area, it seems that Apple actually has been more responsible than Google, i.e. Google has used their kill switch *multiple* times, and Apple has *never* used theirs.  If you have it for security concerns and manage it well, i.e. you have a pretty solid vetting system in your store, and you only use it if its a clear and present danger to the users, I can see this as useful.
/quote]

Though to be fair Apple blocks apps they see as a threat at the source (both for security and for market dominance).

8
Living Room / Re: FUNNY~! Drinking Water DOES NOT Hydrate!
« on: November 22, 2011, 06:39 AM »
Hmm, does this means next up they will ban sport car advertisers from advertising that it helps attract girls?

You mean it doesn't????

Well...then how do you explain this:
 (see attachment in previous post)
 ;D

Hey I never said it doesn't. All I said it cannot be conclusively proven. Money, appearance, personality, clothing etc can also attract girls, and until we know what exactly attracts girls to which extent, I propose that we ban advertisements claiming that their product is the best method for attracting girls.

9
Living Room / Re: FUNNY~! Drinking Water DOES NOT Hydrate!
« on: November 22, 2011, 03:49 AM »
Hmm, does this means next up they will ban sport car advertisers from advertising that it helps attract girls?

10
N.A.N.Y. 2012 / Re: Pledge: Flipside
« on: November 18, 2011, 08:00 AM »
Oooohh, a game!  I think this is the only game pledge, so far. Eager to see it as it develops, Deozaan!  :up:

Except for Hangman? By you?

11
General Software Discussion / Re: classify data
« on: November 08, 2011, 12:07 AM »
it is not exactly what I need and I think I cant make it by my own to be as the one I need, so can you help me with this please

the steps the user will follow are these:
1) place a date at "here I place a date: (this will make some dates be calculated below)
2) place your text at "here I place some text" (this will make the text append at the correct date in the calendar at right) (see attachment in previous post)any hint?

I am not sure what the last version that I uploaded cannot do in terms of what you are requesting now.

Type your first date in cell A1, and the formula to calculate the second date in A2.
First text in cell B1, second text in b2.
Etc.


12
General Software Discussion / Re: classify data
« on: November 07, 2011, 12:27 AM »
Replication Steps:
1) In column A - put the dates of your input data (this can be in another location - but then you have to change the formula later)
2) In column B, for each date in column A  - enter the text you want to associate with this date (again can be in another location, but must be next to the dates)
3) In cell C1 (again, this can be another location - however you will need to change the other locations from here relative to this cell - I am going to stop typing location stuff now), type 2011-01-01 (your first date)
4) In cell d1, "=C1+1", drag to I1
5) Copy c1:I1 to c3:I3
6) c3 "=I1+1"
7) Copy c3:I3 to  c5:I5, c7:I7
8) In cell c2 "=IF(ISNA(VLOOKUP(C1,$A$1:$B$100,2,0)),"",VLOOKUP(C1,$A$1:$B$100,2,0))" (Column A- dates from step 1, B-Text from step 2, 100 was chosen as upper limit - change if you need more (or less) than 100)
9) Copy C2 to D2:I2, C4:I4, C6:I6, C8:I8

Conditional formatting (I cannot remember how to do this in Excel 2003)
Set the date cells to be bold when the row below is non-blank.



The attachment should work (I have removed the 2007 conditional formatting and formulas - but I cannot test it for you).



13
General Software Discussion / Re: classify data
« on: November 04, 2011, 01:07 AM »
Sorry - version 2 was easier than I expected

1) Does bold formatting - but uses conditional formatting of Excel 2007 - may not work properly in Excel 2003 or earlier
2) Puts the text in a new row
3) Less complex than the previous version

14
General Software Discussion / Re: classify data
« on: November 04, 2011, 12:59 AM »
the target cells appear to have date format in the screenshot, but this is not necessary imo, there will be no problem them being simple text
Good - that is the way I have done it - but it can be customised

but the "calculated dates" must be in date format, because they will update according to the date I have set as "today date"

As long as it is Excel dates and not "text" (Excel dates are numbers - and are just formatted to look like a date. If you change it to "Number" you will get a number of around 40000. If you calculate these dates in Excel, it is an Excel date and should work perfectly)


it would be really nice if inside the calendar cells (that will contain the date at top and the appended text at bottom), the date is highlighted, formated or somehow distinguished from the other text below, so that it would be easier to the eye to see which text correspond to which date
This I cannot do

or maybe each date cell in the calendar should be splitted into two cells, one containing the date only and the other (below) containing the appended text
This I can do - will upload another version if you are happy with the approach of my first upload


last, a shortcut or button preferably should trigger the data migration/binding across the cells (from source "my text" cell, to target cells of the calendar, with calculated dates as pointers)


This I cannot do. The links are live (references) and cannot be moved - unless you use macros. If the source data changes - the cells will immediately change (unless automatic formula calculations has been turned off). Should you want a copy (that does not update), I suggest you copy the data to another sheet/place.

15
General Software Discussion / Re: classify data
« on: November 04, 2011, 12:51 AM »
See attached for an attempt (zipped - xlsx attachments not  allowed on DC)

Note that:
1) It is a bit more general than your example (every date can have different text).
2) It does not move the data - it references it (I personally do not like destroying data - and moving the data MUST be done with a macro - this is pure Excel)
3) It has a hidden line 1 and hidden column C - required to calculated the dates properly.
4) You can change the format of the date displayed (change DD-MMM in the formula to the format you want)
5) If you want an empty line between the date and the text, add another ",char(10)" (right before/after the first)
6) Cells MUST be formatted as wrap text, otherwise text will appear on a single line (i.e. linebreaks will be ignored)
7) Created using Excel 2007 - but should work in other versions as well, nothing special done

16
Off topic:
Spoiler
there is this bird in iceland to rescue.

A penguin? In Iceland? Or Antartica?
There might not be penguins in Iceland (ok, well maybe in the zoo...)





17
Google apps is a fantastic solution, IMHO.
I wouldn't use anything else.
The chances of that happening in most corporate environments = 0

Although we have GroupWise and SharePoint purchased - we use shared network locations for collaboration. And lots of e-mail.

18
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 09:38 AM »
whereas in the main window I first have to open the clip

Sounds like you dont have the grid configured to show an excerpt.  You can click on the little button to the far left of the grid column header to configure which columns are shown, and then drag and drop to position and resize.

Thanks - never knew there was an option for it (where is the facepalm emoticon?). Problem solved!

19
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 08:12 AM »
Ah i can do that.. there is a shift+click menu that you can activate for any of the previous history of clips, i could put the formatting menu in there too.

But it's not so hard to do it now, you would just bring up  the main window, select the old clip, then choose the formatting preset from the button drop down arrow. (see attachment in previous post)

I do not use the main window much - maybe that is why I missed it. The beauty of the quickpaste option is that I can see immediately which clip is which - whereas in the main window I first have to open the clip. I can live with it though.

20
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 08:09 AM »
As a stopgap, this AHK code (below) will paste the last clip you copied to clipboard either with or without formatting. (I think I got this from the AHK forum. It's very handy and I find I use it a lot.)

Tip: If you are using CHS you can do this as follows:
  • Crtl+V will paste using windows clipboard, and so will preserve all formatting.
  • Press Ctrl+Alt+Q, to bring up CHS quick paste menu, then hit 1.  This works because it uses the CHS quick paste menu which does plaintext

12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)


one of the remaining big todo items of CHS is to save clips with richtext formatting not just plaintext; not possible yet but coming.

This would be great - the thing is that I use CHS almost as an aggregator e.g. copy 10 times from one document - the paste a bunch of them at once in the second document to minimize switching.

21
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 08:02 AM »
10) Unrelated to the formatting presets: when I use quick paste and the main window exists - the main window is activated first. This is not a big problem but it bothers me as the behaviour differs from when the main window is minimised to tray

can you explain this a bit more, im not sure i understand.

Step by step
1) Open the main window (ctrol+alt+w - or tray)
2) Navigate to Notepad (or anything but CHS)
3) Press Ctrl+Alt+Q (QuickPaste)


Result:
Main Window gets activated, and quick paste menu gets shown. CHS correctly pastes to notepad though, so this is just an annoyance and not a big problem.


22
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 07:57 AM »
7) I would like a way to perform this on a clip from the quick paste menu - though I cannot think of anyway to do it intuitively

if you mean you want a way to apply formatting from quick paste menu you can already do that, from formatting submenu of quick paste menu, or even faster using custom hotkeys set for the formatting item.

Sorry - let me rephrase - when activating the quick paste menu - there is a history of 15 saved clips - I would like to run the formatting on one of these saved clips

23
I created a RegEx preset - and since I spent a long time trying to figure out how to do it (RegEx is something I still struggle with), I though I will share

What I want to do: create presets that comments code out (and next up uncomments it as well) for AHK, Latex and Python - however since only the comment character differs the implementation follow naturally from the first (AHK given in example):
for example, to change:
Line 1
 Line 2 ;space
Line 3 ;tab
  Line 4 ;2space
Line 5 ;2tab
;  Line 6 ;already commented
; Line 7 ;already commented
;Line 8 ;already commented, with indent
to:
;Line 1
; Line 2 ;space
; Line 3 ;tab
;  Line 4 ;2space
; Line 5 ;2tab
;  Line 6 ;already commented
; Line 7 ;already commented
; ;Line 8 ;already commented, with indent
(off topic - you might not want to double comment Line 8 - but this is the way I prefer it )

you can use
Add Stuff|Add to Lines|Prefix : ";" (obviously without the quotes

Find and replace - enable RegEx
Find "^[;;]" (no quotes)
Replace "" (empty string - no quotes)

The RegEx prevents Line 6 and 7 from being double commented (and subsequently upon running this twice or more - maybe with a wider selection - prevents endless comment characters)

To remove
Trimming and Wrapping|Strip Leading Stuff|";"

Mouser - is there somehow that the internal stuff (i.e. presets not using custom tools) like this can be packaged as part of an add-on for CHS? Or packaged with CHS and then have a preset manager where you can delete/disable/enable the unneeded ones. I am more than willing to share my files (stuff like paragraph stripping - for copying from Adobe reader etc - but nothing fancy).

24
Clipboard Help+Spell / Re: CHS: New Formatting Dialog
« on: October 14, 2011, 12:27 AM »
Mouser: after playing with this formatting dialog I have some comments.

1) When I click Modify Format/Case in the Main dialog it would be more intuitive (for me) to be presented a list of saved presets and apply it to the clip (with a preview box of course). You can then have buttons to Rename, Edit, Delete or Create New presets - which will then take you to your formatting screen.

2) There is currently no way to Rename/Delete a preset (1 will solve this)

3) Once in the formatting screen it is not clear which preset is loaded - it will be nice to see this (maybe in the title)

4) There is Accept and Cancel buttons - but no save button. Once (3) is implemented I would expect to have  a button that saves the loaded preset (currently you have to save as). [off topic]This drove me insane until I realised "Accept" accepts the changes to the text - not the preset[/off topic]

5) In the preset editing tree (i.e. where introduction,  add stuff etc are written - figure 2 in first post) - it may be helpful to add a checkmark to show if anything is active in that tree/tab (or make the actives bold or red or anything visual)[off topic]I actually preferred the old screen (as I could see what is on and what is off at a glance) [/off topic]

6) I would like to create a custom order of the list in (1) and this custom order should be kept for the Quick Paste option as well - I use keyboard shortcuts

7) I would like a way to perform this on a clip from the quick paste menu - though I cannot think of anyway to do it intuitively

8) I would like to have the option for user tools NOT to paste the output (my AHK example for example does not require pasting) - maybe if %outfile% does not exist (currently it gives an error).

9) I second the STDIN/STDOUT method as an option - it just seems more natural and cleaner. I would have to try and figure out how to do it in AHK though - but I am sure the forums will have something.


10) Unrelated to the formatting presets: when I use quick paste and the main window exists - the main window is activated first. This is not a big problem but it bothers me as the behaviour differs from when the main window is minimised to tray

11) Unrelated to the formatting presets: When I am in a rename mode (for example in explorer or gbCodeLib9) activating quick paste deactivates the edit/rename mode and the paste gets lost (i.e. go to explorer, select a file, press F2, Quick Paste something - filename unchanged). If there is anyway to prevent this from happening I would be extremely grateful but somehow I think that the creation of the quick paste menu will always do this.

12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)

(The last few points may have ways to do this already - and I apologise in advance for my ignorance should it be so. Also if I should move it to another thread I will do so)

Although I have a lot of comments - this does not mean that I do not find CHS useful. I do not participate in forums for software that I do not find useful, so in a sense this is a big compliment. Only been using it for a week or so and already finding it a huge timesaver.

25
Clipboard Help+Spell / Run AHK
« on: October 13, 2011, 08:03 AM »
Runs current selection as AHK code (i.e. creates tempfile with .ahk extension and runs it)

Requires autohotkey to be installed, and associated with .ahk files

Since users of this will know AHK - I will assume that no further explanation is required.

Code: Autohotkey [Select]
  1. if %0%<=1                                       ;only run if two parameters given
  2.         exitapp
  3.        
  4. infile=%1%                              ;infile first paramater
  5. outfile=%2%                             ;outfile second parameter
  6.  
  7. ;read contents of InFile
  8. FileRead, InFileContents, %Infile%
  9.  
  10. SplitPath, OutFile , OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
  11.  
  12. ;delete old ahk file - using append
  13. FileDelete, %OutDir%\%OutNameNoExt%.ahk
  14.  
  15. ;create new ahk file
  16. FileAppend , #SingleInstance force`n`n%inFileContents%`n`n`n`n ~esc::ExitApp, %OutDir%\%OutNameNoExt%.ahk
  17.  
  18. ;copies infile to outfile - otherwise an error will occur (or alternatively if outfile already exist - old stuff will pe pasted)
  19. FileCopy, %InFile%, %OutFile%,1
  20.  
  21. ;run ahk code
  22. run   %OutDir%\%OutNameNoExt%.ahk

Pages: [1] 2 3next