AS3 Warning message excess bytes - actionscript-3

When I publish my flash files, I get this message:
WARNING: excess bytes: -616, Tag: DefineFont3, Index: 5
WARNING: excess bytes: 2, Tag: DefineFont3, Index: 36
What are these warning? Anything related to these warning?
Yesterday is still fine, but today I get this.

Maybe one of your libraries are using the SWFTimeline. It's source code contains the very same warning.
The following code snippet is from the SWFTimeline.as file, starting at line 84.
// Adjust position (just in case the parser under- or overflows)
if(data.position != pos + tagHeader.tagLength) {
trace("WARNING: excess bytes: " +
(data.position - (pos + tagHeader.tagLength)) + ", " +
"Tag: " + tag.name + ", " +
"Index: " + (tags.length - 1)
);
data.position = pos + tagHeader.tagLength;
}
It seens to be caused by malformed tags or file corruptions, maybe other reasons too.

Related

Disable camel-debezium-mysql endpoint URI in Camel metrics

The full Debezium MySQL URI string shows up in metrics. It shows the MySQL user and password in plaintext, which is unsafe. How can one disable this? I followed this setup here.
More information:
Using quarkus 1.11.1.Final which uses camel 3.7.0 with debezium-connector-mysql 1.3.1.Final
This is the Camel route:
from("debezium-mysql:" + config.getConnectorName()
+ "?databaseHostname=" + config.getHost()
+ "&databasePort=" + config.getPort()
+ "&databaseUser=" + config.getUser()
+ "&databasePassword=" + config.getPassword()
+ "&databaseServerName=" + config.getDatabaseServerName()
+ "&databaseServerId=" + config.getDatabaseServerId()
+ "&databaseIncludeList=" + config.getDatabases()
+ "&tableIncludeList=" + config.getTables()
+ "&columnIncludeList=" + config.getColumns()
+ "&databaseHistoryFileFilename=" + config.getHistoryFile()
+ "&offsetStorageFileName=" + config.getStorageFile()
+ "&exchangePattern=InOnly")
.routeId("debezium")
.process(outgoingProcessor)
.marshal().json(JsonLibrary.Jackson)
.to(ExchangePattern.InOnly, outgoingUri)
.to("micrometer:counter:outgoing.counter")
.end();
And when accessing the metrics at /q/metrics, I find this entry:
# HELP CamelExchangeEventNotifier_seconds_max
# TYPE CamelExchangeEventNotifier_seconds_max gauge
CamelExchangeEventNotifier_seconds_max{camelContext="camel-1", endpointName="debezium-mysql://entire connection string here with user and password", eventType="ExchangeCompletedEvent", failed="false", serviceName="MicrometerEventNotifierService",} 0.0
Thank you for bring this up. I have created a Jira ticket to fix this in the upcoming Camel release to mask those sensitive data in those events in the metrics.

Why is setting SQL variable is creating an error?

Following SQL statement is creating an error with message :
"Message: Fatal error encountered during command execution."
"Inner exception: Parameter '#LastUserID' must be defined."
If I directly use LAST_INSERT_ID() instead of LastUserID, it always returns zero (hence fails at second insert) when executed like this.
I don't see my syntax is different than in mySQL document.
Could some one help me ?
string Query = #"INSERT INTO login (" +
"LOGIN_EMAIL," +
"LOGIN_PASSWORD," +
"LOGIN_SALT," +
"LOGIN_LAST_LOGIN_DATE," +
// "LOGIN_LAST_LOGIN_LOCATION," +
"LOGIN_ACCOUNT_STATUS," +
"LOGIN_LOGIN_ATTEMPTS," +
"LOGIN_CREATED_DATE) " +
"VALUES (" +
"#Parameter2," +
"#Parameter3," +
"#Parameter4," +
"#Parameter5," +
// "#Parameter6," +
"#Parameter6," +
"#Parameter7," +
"#Parameter8); " +
"SET #LastUserID = LAST_INSERT_ID(); " +
"INSERT INTO user_role (" +
"USER_ROLE_USER_ID," +
"USER_ROLE_ROLE," +
"USER_ROLE_STATUS," +
"USER_ROLE_CREATED_DATE) " +
"SELECT " +
"#LastUserID," +
"#Parameter9," +
"#Parameter10," +
"#Parameter11 " +
"FROM dual WHERE NOT EXISTS (SELECT USER_ROLE_USER_ID FROM user_role " +
"WHERE USER_ROLE_USER_ID = #LastUserID AND USER_ROLE_ROLE = #Parameter9)";
MySqlCommand oCommand = new MySqlCommand(Query, oMySQLConnecion);
oCommand.Transaction = tr;
Create a procedure in which you first do your insert, cache the last inserted id, do the other insert and let it print out your parameters with a bool if your last insert worked or not. That way you can debug it properly.
In general you should avoid concatinating strings to generate sql-commands or you might get troubles with parameters containing unexpected characters or be hit by a injection.
Simple fix : Replace "$LastUserID" with "$'LastUserID'". The ephostophy makes the difference.

Appendheader needs to append string, variable and then string again

Hopefully this is an easy one for someone out there. I need to append a long command that has strings and variables in it.
this->AppendHeader("Content-Range", "bytes " + offset "-" + (offset + part_size - 1) "/" + file_size);
This is not acceptable in C++. How can I format the above so the Header looks like
Content-Range: bytes 0-19/40
(just a fyi - offset is 0, part_size is 20 and file_size is 40)

SSRS expression to get first character from string

I am having a field with string values as "First Middle Last" and i want to show the initial characters from this string as "FML"
how can i do it in terms of ssrs expression ?
Assuming the field MyString always has 3 words the following will find the first character of the First, Second and Last words. This admittedly doesn't handle instances where there are more or less than 3 words, but hopefully should get you started if you require more finesse.
=Left(Fields!MyString.Value, 1) + " " +
Left(Mid(Fields!MyString.Value, InStr(Fields!MyString.Value, " ") + 1), 1) + " " +
Left(Mid(Fields!MyString.Value, InStrRev(Fields!MyString.Value, " ") + 1), 1)
Edit
To cope with the possiblity of only two words (as suggested in the commetns below) a check for the index of the spaces could be used to ensure that they are not the same, and thus 3 words exist. This would make the code as follows
=Left(Fields!MyString.Value, 1) + " " +
Left(Mid(Fields!MyString.Value, InStr(Fields!MyString.Value, " ") + 1), 1) +
iif(InStrRev(Fields!MyString.Value, " ") > InStr(Fields!MyString.Value, " "),
" " + Left(Mid(Fields!MyString.Value, InStrRev(Fields!MyString.Value, " ") + 1), 1),
"")

plugin for formatting comments

Can anyone point me in the direction of a plugin or otherwise for formatting comments?
I'm using coffeescript, commenting is the same as python (#line, ### block ###), although javascript commenting also passes straight through the compiler.
OK, turns out that Edit -> Wrap keeps comments intact - complete newby.
There is also https://github.com/spadgos/sublime-jsdocs
I don't have a plug-in but I can offer a python script that I wrote. Enter your comment as a string at the 'user entered comment' (uec) variable, save and run. It will format a block quote surrounded by pound signs 80 characters across. If you need your block quote shorter or longer then just change the 80, the 78, and the 76.
def first2lines(): return str(('#' * 80) + '\n' + '#' + (' ' * 78) + '#') # first two lines
def leftSide(): return '# ' # left side of border
def rightSide(): return ' #' # right side of border
def last2lines(): return str('#' + (' ' * 78) + '#' + '\n' + ('#' * 80)) # last two lines
# user entered comment
uec = "This program will neatly format a programming comment block so that it's surrounded by pound signs (#). It does this by splitting the comment into a list and then concatenating strings each no longer than 76 characters long including the correct amount of right side space padding. "
if len(uec) > 0:
eosm = '<<<EOSM>>>' # end of string marker
comment = uec + ' ' + eosm
wordList = comment.split() # load the comment into a list
tmpString = '' # temporarily holds loaded elements
loadComment = '' # holds the elements that will be printed
counter = 0 # keeps track of the number of elements/words processed
space = 0 # holds right side space padding
last = wordList.index(wordList[-1]) # numerical position of last element
print first2lines()
for word in wordList:
tmpString += word + ' ' # load the string until length is greater than 76
# processes and prints all comment lines except the last one
if len(tmpString.rstrip()) > 76:
tmpList = tmpString.split()
tmpString = tmpList[-1] + ' ' # before popping last element load it for the beginning of the next cycle
tmpList.pop()
for tmp in tmpList:
loadComment += tmp + ' '
loadComment = loadComment.rstrip()
space = 76 - len(loadComment)
print leftSide() + loadComment + (space * ' ') + rightSide()
loadComment = ''
# processes and prints the last comment line
elif len(tmpString.rstrip()) <= 76 and counter == last:
tmpList = tmpString.split()
tmpList.pop()
for tmp in tmpList:
loadComment += tmp + ' '
loadComment = loadComment.rstrip()
space = 76 - len(loadComment)
print leftSide() + loadComment + (space * ' ') + rightSide()
counter += 1
print last2lines()
else:
print first2lines()
print leftSide() + "The length of your comment is zero, it must be at least one character long. " + rightSide()
print last2lines()
You can use netbeans, it has autoFormatting Alt+Mayus+F